-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclean.yaml
42 lines (40 loc) · 1.01 KB
/
clean.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
- name: clean
hosts: registry
vars_files:
- vars/vars
- vars/vault
- vars/common_vars
- vars/common_vault
vars:
- project_stage_dir: "{{ stage_dir }}/{{ project_id }}/{{ inventory_hostname }}"
tasks:
- name: 'clean the staging area'
file: 'path={{ project_stage_dir }} state=absent'
become: true
become_user: root
- name: remove the ca
hosts: all
serial: 1
vars_files:
- vars/vars
- vars/vault
- vars/common_vars
- vars/common_vault
tasks:
- name: clean the ca directory
file: 'path={{ ca_dir }} state=absent'
become: true
become_user: root
- name: remove ca cert from host
file: path=/usr/local/share/ca-certificates/{{ project_id }} state=absent
become: true
become_user: root
- name: update list of trusted CAs
command: update-ca-certificates
become: true
become_user: root
- name: restart docker
service: name=docker state=restarted
become: true
become_user: root