-
Notifications
You must be signed in to change notification settings - Fork 3
/
post-make.yml
49 lines (42 loc) · 927 Bytes
/
post-make.yml
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
43
44
45
46
47
48
49
---
- name: set up devtool
hosts: all
strategy: free
vars:
target_env: "{{ lookup('env', 'target') }}"
vars_files:
- /root/.qcacode
tasks:
- name: set up confd.toml
copy:
src: files/etc/confd/confd.toml
dest: /etc/confd/confd.toml
owner: root
group: root
when: target_env == 'dev'
- name: start confd for dev
service:
name: confd
state: started
enabled: yes
when: target_env == 'dev'
- name: remove SSH keys for production
copy:
dest: /root/.ssh/authorized_keys
content: ''
force: yes
when: target_env != 'dev'
- name: refresh systemd conf
systemd:
daemon_reload: yes
when: target_env == 'dev'
- name: clear apt
apt:
autoclean: yes
autoremove: yes
- name: clean up
shell: |
>/var/log/syslog
>~/.bash_history && history -c
args:
executable: /bin/bash