mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.0 KiB
YAML
65 lines
2.0 KiB
YAML
9 years ago
|
- name: setup state
|
||
|
hosts: testhost
|
||
|
connection: local
|
||
|
gather_facts: false
|
||
|
tasks:
|
||
9 years ago
|
- file: path={{playbook_dir}}/files state=directory
|
||
9 years ago
|
- file: path={{playbook_dir}}/roles/showfile/files state=directory
|
||
9 years ago
|
- 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'
|
||
9 years ago
|
- set_fact: role_out="in role files" play_out="in files" stage='setup'
|
||
9 years ago
|
|
||
|
- 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
|
||
9 years ago
|
- set_fact: role_out="in role tasks" play_out="in files" stage='remove 1'
|
||
9 years ago
|
|
||
|
- 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
|
||
9 years ago
|
- set_fact: role_out="in files" play_out="in files" stage='remote 2'
|
||
9 years ago
|
|
||
|
- 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
|
||
9 years ago
|
- set_fact: role_out="in files" play_out="in files" stage='remove 3'
|
||
9 years ago
|
|
||
|
- include: testplay.yml
|
||
|
|
||
|
- name: remove from play/files
|
||
|
hosts: testhost
|
||
|
connection: local
|
||
|
gather_facts: false
|
||
|
tasks:
|
||
|
- file: path={{playbook_dir}}/files/testfile state=absent
|
||
9 years ago
|
- set_fact: role_out="in local" play_out="in local" stage='remove 4'
|
||
9 years ago
|
|
||
|
- include: testplay.yml
|
||
|
|
||
|
- name: cleanup
|
||
|
hosts: testhost
|
||
|
connection: local
|
||
|
gather_facts: false
|
||
|
tasks:
|
||
|
- file: path={{playbook_dir}}/testfile state=absent
|
||
9 years ago
|
- file: path={{playbook_dir}}/files state=absent
|
||
9 years ago
|
- file: path={{playbook_dir}}/roles/showfile/files state=absent
|