43
|
1 |
--- |
|
2 |
|
|
3 |
- name: apt install ngircd |
|
4 |
become: yes |
|
5 |
apt: name="ngircd" |
|
6 |
notify: restart ngircd |
|
7 |
|
|
8 |
- name: config server name |
|
9 |
become: yes |
|
10 |
lineinfile: |
|
11 |
path: "/etc/ngircd/ngircd.conf" |
|
12 |
regexp: '^ Name =' |
|
13 |
line: " Name = {{ngircd_name}}" |
|
14 |
notify: restart ngircd |
|
15 |
|
48
|
16 |
- name: config server local listen |
|
17 |
become: yes |
|
18 |
lineinfile: |
|
19 |
path: "/etc/ngircd/ngircd.conf" |
|
20 |
regexp: '^ Listen =' |
|
21 |
line: " Listen = 127.0.0.1" |
|
22 |
insertafter: "^ ;Listen =" |
|
23 |
notify: restart ngircd |
|
24 |
|
|
25 |
- name: config motd |
|
26 |
become: yes |
|
27 |
lineinfile: |
|
28 |
path: "/etc/ngircd/ngircd.conf" |
|
29 |
regexp: '^ Info =' |
|
30 |
line: " Info = {{ngircd_motd}}" |
|
31 |
notify: restart ngircd |
|
32 |
|
|
33 |
- name: copy motd file |
43
|
34 |
become: yes |
|
35 |
copy: |
|
36 |
src: "{{ngircd_motd_src}}" |
|
37 |
dest: "/etc/ngircd/ngircd.motd" |
|
38 |
mode: "0644" |
|
39 |
notify: restart ngircd |
|
40 |
|
|
41 |
- name: start ngircd service |
|
42 |
become: yes |
|
43 |
systemd: name="ngircd" state="started" daemon_reload="yes" |