1 #####################################
2 ### someone"s ansible provisioner ###
3 #####################################
4 # Part of: https://git.somenet.org/root/pub/somesible.git
5 # 2017-2024 by someone <someone@somenet.org>
8 - name: install anope irc services
15 ignore_errors: "{{ignore_online_errors | bool}}"
18 - name: create anope user
28 - name: create anope user's homedir
37 - name: create anope-db dir
46 - name: create anope-db-backup dir
48 path: "/srv/anope/db/backups"
55 - name: create anope logdir
57 path: "/var/log/anope"
64 - name: copy chanserv.conf config
67 dest: "/etc/anope/chanserv.conf"
72 - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/chanserv.conf"
73 - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/chanserv.conf"
74 - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/chanserv.conf"
75 - "default/chanserv.conf"
76 notify: reload anope.service
79 - name: copy global.conf config
82 dest: "/etc/anope/global.conf"
87 - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/global.conf"
88 - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/global.conf"
89 - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/global.conf"
90 - "default/global.conf"
91 notify: reload anope.service
94 - name: copy hostserv.conf config
97 dest: "/etc/anope/hostserv.conf"
102 - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/hostserv.conf"
103 - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/hostserv.conf"
104 - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/hostserv.conf"
105 - "default/hostserv.conf"
106 notify: reload anope.service
109 - name: copy memoserv.conf config
112 dest: "/etc/anope/memoserv.conf"
117 - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/memoserv.conf"
118 - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/memoserv.conf"
119 - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/memoserv.conf"
120 - "default/memoserv.conf"
121 notify: reload anope.service
124 - name: copy modules.conf config
127 dest: "/etc/anope/modules.conf"
132 - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/modules.conf"
133 - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/modules.conf"
134 - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/modules.conf"
135 - "default/modules.conf"
136 notify: reload anope.service
139 - name: copy nickserv.conf config
142 dest: "/etc/anope/nickserv.conf"
147 - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/nickserv.conf"
148 - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/nickserv.conf"
149 - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/nickserv.conf"
150 - "default/nickserv.conf"
151 notify: reload anope.service
154 - name: copy operserv.conf config
157 dest: "/etc/anope/operserv.conf"
162 - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/operserv.conf"
163 - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/operserv.conf"
164 - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/operserv.conf"
165 - "default/operserv.conf"
166 notify: reload anope.service
169 - name: copy services.conf config
172 dest: "/etc/anope/services.conf"
177 - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/services.conf"
178 - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/services.conf"
179 - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/services.conf"
180 - "default/services.conf"
181 notify: reload anope.service
184 - name: copy services.motd config
187 dest: "/etc/anope/services.motd"
192 - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/services.motd"
193 - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/services.motd"
194 - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/services.motd"
195 - "default/services.motd"
196 notify: reload anope.service
199 - name: copy anope.service to /etc/systemd/system/
202 dest: "/etc/systemd/system/anope.service"
207 - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/anope.service"
208 - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/anope.service"
209 - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/anope.service"
210 - "default/anope.service"
213 - name: enable and start anope.service
214 include_role: name="base/systemd/enable-and-start"
216 service_name: anope.service