Hi,

I’m trying to write role for configuration of the package management. In
this role I following setup.

— defaults/main.yml
debain_source_list:
  - name: debian
  state: enabled
- name: debian-backports
  state: enabled
- name: debian-lts
  state: enabled





— task/setup-Debian.yml
- name: "[repository] apt source list files"
  action: template src=???? dest=/etc/apt/sources.d/????.list
  with_items: " {{ debain_source_list }}"
  when: "item.state != 'enabled'"
  with_first_found:
  - {{ item.name }}.list.{{ ansible_lsb.id }}.{{ ansible_lsb.codename }}
  - default.list


The idea is to have separate source list files for each Debian release
/wheeze, squeeze, …/, if the file is not found put there some default
file. The problem is how to run more loops and address variables in one
action.

Consider this to be an example and will be used as template for another
actions. I do not want to sync the directories.

        Best regards
                Peter Hudec

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CFF505AC.3A5BF%25peter.hudec%40cnc.sk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to