---

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

- name: configure ngircd
  become: yes
  template:
    src: "ngircd.conf.j2"
    dest: "/etc/ngircd/ngircd.conf"
  notify: restart ngircd

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

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