hi can you run with debug?

i use similar

- name: manage_lvm | creating new LVM logical volume(s)
lvol:
vg: "{{ item[0]['vgname'] }}"
lv: "{{ item[1]['lvname'] }}"
size: "{{ item[1]['size'] }}"
shrink: no
opts: "{{ item[1]['opts'] | default('') }}"
state: "present"
become: true
register: lvm
with_subelements:
- "{{ lvm_groups }}"
- lvnames
when: >
((item[0]['create'] is defined
and item[0]['create']) and
(item[1] is defined and
item[1] != 'None') and
(item[1]['create'] is defined and
item[1]['create']))



lvm_groups:
- vgname: root_vg
create: true
lvnames:
- lvname: root_lv
size: 16G
create: true
filesystem: ext4
mount: true
mntp: /
- lvname: tmp_lv
size: 8G
create: true
filesystem: ext4
mount: true
mntp: /tmp
- lvname: var_lv
size: 4G
create: true
filesystem: ext4
mount: true
mntp: /var



Il giorno mer 12 set 2018 alle ore 14:27 Brad <[email protected]> ha
scritto:

> Relatively new to ansible.  Trying to create a logical volume on some RHEL
> 7 servers.  I have:
>
> - name: make-lv
>   lvol:
>     vg: vg_{{ inventory_hostname_short }}
>     lv: lv_ekb
>     size: 100%FREE
>     state: present
>
> which works fine if the logical volume does not exist, but fails when it
> does.  How do I tell it not to fail if the logical volume already exists?
>
> Thanks!
>
> --
> 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/7f9ec1c9-6ea5-49c6-894a-e05519b54bdb%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/7f9ec1c9-6ea5-49c6-894a-e05519b54bdb%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAJ%3DxKPYbjB1gZhX2oN-MNPvN3LdGwp8q0z-zrUFxfBnShG9ujQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to