ngircd/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Mon, 29 Jun 2020 18:38:49 -0500
changeset 56 59e94b4a91a2
parent 48 4b18b1523ec2
child 113 d843011c249d
permissions -rw-r--r--
Added mercurial web hosting

---

- 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"