src.nth.io/

summaryrefslogtreecommitdiff
path: root/ngircd/tasks/main.yaml
blob: 979deba98a475a8e3a1d918c8c55e9a08870341e (plain)
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
---

- name: apt install ngircd
  become: yes
  apt: name="ngircd"
  notify: restart ngircd

- name: config server name
  become: yes
  lineinfile:
    path: "/etc/ngircd/ngircd.conf"
    regexp: '^	Name ='
    line: "	Name = {{ngircd_name}}"
  notify: restart ngircd

- name: config server local listen
  become: yes
  lineinfile:
    path: "/etc/ngircd/ngircd.conf"
    regexp: '^	Listen ='
    line: "	Listen = 127.0.0.1"
    insertafter: "^	;Listen ="
  notify: restart ngircd

- name: config motd
  become: yes
  lineinfile:
    path: "/etc/ngircd/ngircd.conf"
    regexp: '^	Info ='
    line: "	Info = {{ngircd_motd}}"
  notify: restart ngircd

- name: copy motd file
  become: yes
  copy:
    src: "{{ngircd_motd_src}}"
    dest: "/etc/ngircd/ngircd.motd"
    mode: "0644"
  notify: restart ngircd

- name: start ngircd service
  become: yes
  systemd: name="ngircd" state="started" daemon_reload="yes"