Debian Codegraph @

test/integration/targets/ansible-galaxy/cleanup.yml

raw
1 - hosts: localhost
2 vars:
3 git_install: '{{ lookup("file", lookup("env", "OUTPUT_DIR") + "/git_install.json") | from_json }}'
4 openssl_install: '{{ lookup("file", lookup("env", "OUTPUT_DIR") + "/openssl_install.json") | from_json }}'
5 ws_dir: '{{ lookup("file", lookup("env", "OUTPUT_DIR") + "/ws_dir.json") | from_json }}'
6 testserver_pid: '{{ lookup("file", ws_dir ~ "/testserver.json") | from_json }}'
7 tasks:
8 - name: cleanup
9 include_tasks: "{{ cleanup_filename }}"
10 with_first_found:
11 - "cleanup-{{ ansible_distribution | lower }}.yml"
12 - "cleanup-default.yml"
13 loop_control:
14 loop_var: cleanup_filename
15
16 - name: stop testserver
17 raw: kill -2 {{ testserver_pid }}
18
19 - name: Remove default collection directories
20 file:
21 path: "{{ item }}"
22 state: absent
23 loop:
24 - "~/.ansible/collections/ansible_collections"
25 - /usr/share/ansible/collections/ansible_collections
26
27 - name: Remove webserver directory
28 file:
29 path: "{{ ws_dir }}"
30 state: absent