-
Notifications
You must be signed in to change notification settings - Fork 10
/
irc.yml
59 lines (51 loc) · 1.59 KB
/
irc.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
# -*- eval: (ansible) -*-
- include: vault.yml load=irc,users hosts=irc
- name: Configure IRC servers
hosts: irc_servers
become: false
tasks:
# # Does not work on CoreOS, due to the fucked up
# # Python install and lack of installable packages.
# - name: Start the ircd container
# docker_container:
# name: ircd
# state: started
- name: Copy static configuration
copy:
src: "{{ item }}"
dest: /home/core/unrealircd/{{ item | basename }}
with_fileglob:
- unrealircd/*.conf
- unrealircd/ircd.motd
notify: [rehash ircd]
- name: Generate templated configuration
template:
src: "{{ item }}"
dest: /home/core/unrealircd/{{ item | basename | regex_replace('\.j2$', '') }}
with_fileglob:
- unrealircd/*.j2
notify: [rehash ircd]
handlers:
- name: rehash ircd
command: docker exec -i ircd /unrealircd/unreal rehash
- name: Configure IRC services
hosts: services.irc.hashbang.sh
become: true
tasks:
- name: Copy static configuration
copy:
src: "{{ item }}"
dest: /home/core/anope/config/{{ item | basename }}
with_fileglob:
- anope/*.conf
notify: [Reload anope config]
- name: Generate templated configuration
template:
src: "{{ item }}"
dest: /home/core/anope/config/{{ item | basename | regex_replace('\.j2$', '') }}
with_fileglob:
- anope/*.j2
notify: [Reload anope config]
handlers:
- name: Reload anope config
command: docker exec -i irc-services pkill -HUP services