2015-08-12 19:00:54 -04:00
|
|
|
- name: setup state
|
2019-04-29 16:27:34 -07:00
|
|
|
hosts: localhost
|
2015-08-12 19:00:54 -04:00
|
|
|
gather_facts: false
|
|
|
|
tasks:
|
2015-08-13 09:53:44 -04:00
|
|
|
- file: path={{playbook_dir}}/files state=directory
|
2015-08-13 09:57:36 -04:00
|
|
|
- file: path={{playbook_dir}}/roles/showfile/files state=directory
|
2015-08-12 19:00:54 -04:00
|
|
|
- copy: dest={{playbook_dir}}/roles/showfile/files/testfile content='in role files'
|
|
|
|
- copy: dest={{playbook_dir}}/roles/showfile/testfile content='in role'
|
2016-12-09 10:18:15 +01:00
|
|
|
- copy: dest={{playbook_dir}}/roles/showfile/tasks/testfile content='in role tasks'
|
2015-08-12 19:00:54 -04:00
|
|
|
- copy: dest={{playbook_dir}}/files/testfile content='in files'
|
|
|
|
- copy: dest={{playbook_dir}}/testfile content='in local'
|
|
|
|
|
2021-04-09 09:28:24 -05:00
|
|
|
- import_playbook: testplay.yml
|
2016-12-09 10:18:15 +01:00
|
|
|
vars:
|
|
|
|
remove: nothing
|
|
|
|
role_out: in role files
|
|
|
|
play_out: in files
|
2015-08-12 19:00:54 -04:00
|
|
|
|
2021-04-09 09:28:24 -05:00
|
|
|
- import_playbook: testplay.yml
|
2016-12-09 10:18:15 +01:00
|
|
|
vars:
|
|
|
|
remove: roles/showfile/files/testfile
|
|
|
|
role_out: in role
|
|
|
|
play_out: in files
|
2015-08-12 19:00:54 -04:00
|
|
|
|
2021-04-09 09:28:24 -05:00
|
|
|
- import_playbook: testplay.yml
|
2016-12-09 10:18:15 +01:00
|
|
|
vars:
|
|
|
|
remove: roles/showfile/testfile
|
|
|
|
role_out: in role tasks
|
|
|
|
play_out: in files
|
2015-08-12 19:00:54 -04:00
|
|
|
|
2021-04-09 09:28:24 -05:00
|
|
|
- import_playbook: testplay.yml
|
2016-12-09 10:18:15 +01:00
|
|
|
vars:
|
|
|
|
remove: roles/showfile/tasks/testfile
|
|
|
|
role_out: in files
|
|
|
|
play_out: in files
|
2015-08-12 19:00:54 -04:00
|
|
|
|
2021-04-09 09:28:24 -05:00
|
|
|
- import_playbook: testplay.yml
|
2016-12-09 10:18:15 +01:00
|
|
|
vars:
|
|
|
|
remove: files/testfile
|
|
|
|
role_out: in local
|
|
|
|
play_out: in local
|
2015-08-12 19:00:54 -04:00
|
|
|
|
|
|
|
- name: cleanup
|
2019-04-29 16:27:34 -07:00
|
|
|
hosts: localhost
|
2015-08-12 19:00:54 -04:00
|
|
|
gather_facts: false
|
|
|
|
tasks:
|
|
|
|
- file: path={{playbook_dir}}/testfile state=absent
|
2015-08-13 09:53:44 -04:00
|
|
|
- file: path={{playbook_dir}}/files state=absent
|
2015-08-13 09:58:30 -04:00
|
|
|
- file: path={{playbook_dir}}/roles/showfile/files state=absent
|