Files
tower-tests/file-creation-test.yml

47 lines
815 B
YAML

---
- name: Create inventory based on extra_vars
hosts: all
gather_facts: no
become: no
vars_files:
- vars/defaults.yml
vars:
provision_host: "{{ tower_provision_host | default(ansible_play_hosts | join(',')) }}"
tasks:
- name: "Create in-memory inventory"
add_host:
name: "{{ item }}"
groups:
- remdiation
delegate_to: localhost
loop: "{{ provision_host.split(',') }}"
# =========================================================================== #
- name: Create a test file on remediation group
hosts: remdiation
gather_facts: no
become: no
vars_files:
- vars/defaults.yml
tasks:
- name: "Test #1 - Copy file to machine"
copy:
src : files/hello-ansible.txt
dest : "{{ check_file }}"
...