2015-08-13 01:00:54 +02:00
|
|
|
- name: setup state
|
2019-04-30 01:27:34 +02:00
|
|
|
hosts: localhost
|
2015-08-13 01:00:54 +02:00
|
|
|
gather_facts: false
|
|
|
|
tasks:
|
2015-08-13 15:53:44 +02:00
|
|
|
- file: path={{playbook_dir}}/files state=directory
|
2015-08-13 15:57:36 +02:00
|
|
|
- file: path={{playbook_dir}}/roles/showfile/files state=directory
|
2015-08-13 01:00:54 +02: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-13 01:00:54 +02:00
|
|
|
- copy: dest={{playbook_dir}}/files/testfile content='in files'
|
|
|
|
- copy: dest={{playbook_dir}}/testfile content='in local'
|
|
|
|
|
2021-04-09 16:28:24 +02: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-13 01:00:54 +02:00
|
|
|
|
2021-04-09 16:28:24 +02: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-13 01:00:54 +02:00
|
|
|
|
2021-04-09 16:28:24 +02: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-13 01:00:54 +02:00
|
|
|
|
2021-04-09 16:28:24 +02: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-13 01:00:54 +02:00
|
|
|
|
2021-04-09 16:28:24 +02: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-13 01:00:54 +02:00
|
|
|
|
|
|
|
- name: cleanup
|
2019-04-30 01:27:34 +02:00
|
|
|
hosts: localhost
|
2015-08-13 01:00:54 +02:00
|
|
|
gather_facts: false
|
|
|
|
tasks:
|
|
|
|
- file: path={{playbook_dir}}/testfile state=absent
|
2015-08-13 15:53:44 +02:00
|
|
|
- file: path={{playbook_dir}}/files state=absent
|
2015-08-13 15:58:30 +02:00
|
|
|
- file: path={{playbook_dir}}/roles/showfile/files state=absent
|