-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployCFG.yml
59 lines (53 loc) · 1.9 KB
/
deployCFG.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
50
51
52
53
54
55
56
57
58
59
---
- name : Update cfgs and scripts for cs_ebot
hosts: cs
gather_facts: False
become_method: sudo
vars_files: secrets.yml
vars:
home: /home/{{service_user}}
tasks:
- name: copy common files to node
synchronize:
src: 'common/csgo'
dest: '{{home}}/cs'
become: yes
become_user: '{{service_user}}'
- name: copy specific files to node
synchronize:
src: '{{group_names[1]}}/csgo'
dest: '{{home}}/cs'
become: yes
become_user: '{{service_user}}'
- name: copy name template
template:
src: '{{group_names[1]}}/name.cfg.j2'
dest: '{{home}}/cs/csgo/cfg/name.cfg'
owner: '{{service_user}}'
group: '{{service_user}}'
- name: copy sec template
template:
src: 'common/sec.cfg.j2'
dest: '{{home}}/cs/csgo/cfg/sec.cfg'
owner: '{{service_user}}'
group: '{{service_user}}'
- name: copy run.sh template
template:
src: 'common/run.sh.j2'
dest: '{{home}}/cs/run.sh'
owner: '{{service_user}}'
group: '{{service_user}}'
mode: 0755
- name: copy service templates
template:
src: 'common/cs.service.j2'
dest: /etc/systemd/system/{{group_names[1]}}{{item}}.service
with_items:
- 1
- 2
- 3
- 4
become: True
- name: reload service
command: systemctl daemon-reload
become: True