2015-08-13 01:00:54 +02:00
|
|
|
- name: setup state
|
|
|
|
hosts: testhost
|
|
|
|
connection: local
|
|
|
|
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/tasks/testfile content='in role tasks'
|
|
|
|
- copy: dest={{playbook_dir}}/roles/showfile/testfile content='in role'
|
|
|
|
- copy: dest={{playbook_dir}}/files/testfile content='in files'
|
|
|
|
- copy: dest={{playbook_dir}}/testfile content='in local'
|
2015-08-13 01:26:04 +02:00
|
|
|
- set_fact: role_out="in role files" play_out="in files" stage='setup'
|
2015-08-13 01:00:54 +02:00
|
|
|
|
|
|
|
- include: testplay.yml
|
|
|
|
|
|
|
|
- name: remove from role/files
|
|
|
|
hosts: testhost
|
|
|
|
connection: local
|
|
|
|
gather_facts: false
|
|
|
|
tasks:
|
|
|
|
- file: path={{playbook_dir}}/roles/showfile/files/testfile state=absent
|
2015-08-13 01:26:04 +02:00
|
|
|
- set_fact: role_out="in role tasks" play_out="in files" stage='remove 1'
|
2015-08-13 01:00:54 +02:00
|
|
|
|
|
|
|
- include: testplay.yml
|
|
|
|
|
|
|
|
- name: remove from role/tasks
|
|
|
|
hosts: testhost
|
|
|
|
connection: local
|
|
|
|
gather_facts: false
|
|
|
|
tasks:
|
|
|
|
- file: path={{playbook_dir}}/roles/showfile/tasks/testfile state=absent
|
2015-08-13 01:26:04 +02:00
|
|
|
- set_fact: role_out="in files" play_out="in files" stage='remote 2'
|
2015-08-13 01:00:54 +02:00
|
|
|
|
|
|
|
- include: testplay.yml
|
|
|
|
|
|
|
|
- name: remove from role dir
|
|
|
|
hosts: testhost
|
|
|
|
connection: local
|
|
|
|
gather_facts: false
|
|
|
|
tasks:
|
|
|
|
- file: path={{playbook_dir}}/roles/showfile/testfile state=absent
|
2015-08-13 01:26:04 +02:00
|
|
|
- set_fact: role_out="in files" play_out="in files" stage='remove 3'
|
2015-08-13 01:00:54 +02:00
|
|
|
|
|
|
|
- include: testplay.yml
|
|
|
|
|
|
|
|
- name: remove from play/files
|
|
|
|
hosts: testhost
|
|
|
|
connection: local
|
|
|
|
gather_facts: false
|
|
|
|
tasks:
|
|
|
|
- file: path={{playbook_dir}}/files/testfile state=absent
|
2015-08-13 01:26:04 +02:00
|
|
|
- set_fact: role_out="in local" play_out="in local" stage='remove 4'
|
2015-08-13 01:00:54 +02:00
|
|
|
|
|
|
|
- include: testplay.yml
|
|
|
|
|
|
|
|
- name: cleanup
|
|
|
|
hosts: testhost
|
|
|
|
connection: local
|
|
|
|
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
|