Files
tower-tests/file-removal-test.yml
2022-02-23 19:03:06 -05:00

41 lines
716 B
YAML

---
- name: Create inventory based on passed extra_vars
hosts: localhost
gather_facts: no
become: no
vars:
provision_host: "{{ tower_provision_host | default('localhost') }}"
tasks:
- name: "Create in-memory inventory for {{ provision_host }}"
add_host:
name: "{{ provision_host }}"
groups:
- remdiation
# =========================================================================== #
- name: Remove file from hosts
hosts: remdiation
gather_facts: no
become: no
vars_files:
- vars/defaults.yml
tasks:
- name: "Remove file from {{ inventory_hostname }}"
file:
path : "{{ check_file }}"
state : absent
...