Commit 08850152 authored by Oyvind.Gjesdal's avatar Oyvind.Gjesdal
Browse files

try to use changed

parent 1a4d8b0d
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
pvs: "{{ item.device }}" pvs: "{{ item.device }}"
state: "present" state: "present"
with_items: "{{ volumes_add }}" with_items: "{{ volumes_add }}"
register: "volume_group"
when: "not skip_vg_create | default (false) | bool" when: "not skip_vg_create | default (false) | bool"
- name: "Creating new logical volumes" - name: "Creating new logical volumes"
...@@ -28,12 +29,14 @@ ...@@ -28,12 +29,14 @@
size: "100%FREE" size: "100%FREE"
shrink: "no" shrink: "no"
with_items: "{{ volumes_add }}" with_items: "{{ volumes_add }}"
when: "volume_group.changed | bool"
- name: "Creating new filesystems on new volumes" - name: "Creating new filesystems on new volumes"
filesystem: filesystem:
fstype: "{{ item.fs_type }}" fstype: "{{ item.fs_type }}"
dev: "/dev/{{ item.vgname }}/{{ item.lvname }}" dev: "/dev/{{ item.vgname }}/{{ item.lvname }}"
with_items: "{{ volumes_add }}" with_items: "{{ volumes_add }}"
when: "volume_group.changed | bool"
- name: "Create mount points" - name: "Create mount points"
file: file:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment