diff options
author | Christian Pointner <equinox@spreadspace.org> | 2019-05-25 03:56:10 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2019-05-25 03:56:10 +0200 |
commit | a5dc25ddf79c490b3c4118923d325b4af7bb65dc (patch) | |
tree | 7223afa81be890472bf442dbe4a07fbe7c7b5e30 /roles/vm | |
parent | fix cloud-install (diff) |
replace most with_dicts
Diffstat (limited to 'roles/vm')
-rw-r--r-- | roles/vm/guest/tasks/main.yml | 12 | ||||
-rw-r--r-- | roles/vm/install/tasks/main.yml | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/roles/vm/guest/tasks/main.yml b/roles/vm/guest/tasks/main.yml index 4830d051..68c36be3 100644 --- a/roles/vm/guest/tasks/main.yml +++ b/roles/vm/guest/tasks/main.yml @@ -4,23 +4,23 @@ state: present - name: Configure rngd [1/2] + loop: '{{ rngd_config | dict2items }}' + loop_control: + label: "{{ item.key }}" lineinfile: path: /etc/default/rng-tools line: '{{ item.key }}={{ item.value }}' regexp: '^#?{{ item.key }}=' - with_dict: '{{ rngd_config }}' - loop_control: - label: "{{ item.key }}" notify: restart rngd - name: Configure rngd [2/2] + loop: '{{ rngd_config | dict2items }}' + loop_control: + label: "{{ item.key }}" lineinfile: path: /etc/default/rng-tools regexp: '^{{ item.key }}=(?!{{ item.value }})' state: absent - with_dict: '{{ rngd_config }}' - loop_control: - label: "{{ item.key }}" notify: restart rngd - name: Provide a root shell on the VM console [1/2] diff --git a/roles/vm/install/tasks/main.yml b/roles/vm/install/tasks/main.yml index a971a7be..dc272b67 100644 --- a/roles/vm/install/tasks/main.yml +++ b/roles/vm/install/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: create disks for vm - with_dict: "{{ hostvars[hostname].install_cooked.disks.virtio | default({}) | combine(hostvars[hostname].install_cooked.disks.scsi | default({})) }}" + loop: "{{ hostvars[hostname].install_cooked.disks.virtio | default({}) | combine(hostvars[hostname].install_cooked.disks.scsi | default({})) | dict2items }}" lvol: vg: "{{ item.value.vg }}" lv: "{{ item.value.lv }}" |