ensure old facts are removed for hosts that are being reinstalled

This commit is contained in:
Kevin Fenzi 2018-12-20 18:29:02 +00:00
parent 60bf93066d
commit d3b0f146a1

View file

@ -9,6 +9,11 @@
register: result
check_mode: no
- name: ensure no old facts exist
delegate_to: localhost
file: path=/root/.ansible_facts_cache/{{ inventory_hostname }} state=absent
when: inventory_hostname not in result.list_vms
- name: ensure the lv for the guest is made
lvol: lv={{ inventory_hostname }} vg={{ volgroup }} size={{ lvm_size }} state=present
delegate_to: "{{ vmhost }}"