loop syntax and whitespaces
This commit is contained in:
parent
d2ef3fe27f
commit
74ab96d67f
|
@ -34,8 +34,7 @@
|
|||
special_time: "hourly"
|
||||
user: root
|
||||
job: "rsync -a --delete /etc/libvirt/qemu/ {{ hostvars[item]['ansible_hostname'] }}:/root/libvirt-{{ inventory_hostname }}/"
|
||||
loop:
|
||||
- "{{ groups['hypervisors'] }}"
|
||||
loop: "{{ groups['hypervisors'] }}"
|
||||
when: item != inventory_hostname
|
||||
|
||||
- name: Crontab for sync list of running vm
|
||||
|
@ -45,6 +44,5 @@
|
|||
special_time: "daily"
|
||||
user: root
|
||||
job: "virsh list --all | ssh {{ hostvars[item]['ansible_hostname'] }} 'cat >/root/libvirt-{{ inventory_hostname }}/virsh-list.txt'"
|
||||
loop:
|
||||
- "{{ groups['hypervisors'] }}"
|
||||
loop: "{{ groups['hypervisors'] }}"
|
||||
when: item != inventory_hostname
|
||||
|
|
|
@ -8,9 +8,7 @@
|
|||
path: "/var/lib/lxc/{{ item.name }}/rootfs"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
loop:
|
||||
- "{{ lxc_containers }}"
|
||||
loop: "{{ lxc_containers }}"
|
||||
|
||||
- include: "solr.yml name={{item.name}} solr_version={{item.solr_version}} solr_port={{item.solr_port}}"
|
||||
loop:
|
||||
- "{{ lxc_containers }}"
|
||||
loop: "{{ lxc_containers }}"
|
||||
|
|
|
@ -38,10 +38,8 @@
|
|||
regexp: "{{ item.regexp }}"
|
||||
state: present
|
||||
loop:
|
||||
- line: 'evoadmin: root'
|
||||
regexp: '^evoadmin:'
|
||||
- line: 'www-evoadmin: root'
|
||||
regexp: '^www-evoadmin:'
|
||||
- { line: 'evoadmin: root', regexp: '^evoadmin:' }
|
||||
- { line: 'www-evoadmin: root', regexp: '^www-evoadmin:' }
|
||||
notify: "newaliases"
|
||||
when: etc_aliases.stat.exists
|
||||
|
||||
|
|
Loading…
Reference in New Issue