ngircd/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Wed, 01 Jul 2020 13:14:48 -0500
changeset 105 f902a46eb6bb
parent 48 4b18b1523ec2
child 113 d843011c249d
permissions -rw-r--r--
Added some missing files.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
43
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
---
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     3
- name: apt install ngircd
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
  become: yes
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     5
  apt: name="ngircd"
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     6
  notify: restart ngircd
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     7
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
- name: config server name
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
  become: yes
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    10
  lineinfile:
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    11
    path: "/etc/ngircd/ngircd.conf"
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    12
    regexp: '^	Name ='
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    13
    line: "	Name = {{ngircd_name}}"
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    14
  notify: restart ngircd
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    15
48
4b18b1523ec2 Updated irc tasks.
Luke Hoersten <luke@hoersten.org>
parents: 43
diff changeset
    16
- name: config server local listen
4b18b1523ec2 Updated irc tasks.
Luke Hoersten <luke@hoersten.org>
parents: 43
diff changeset
    17
  become: yes
4b18b1523ec2 Updated irc tasks.
Luke Hoersten <luke@hoersten.org>
parents: 43
diff changeset
    18
  lineinfile:
4b18b1523ec2 Updated irc tasks.
Luke Hoersten <luke@hoersten.org>
parents: 43
diff changeset
    19
    path: "/etc/ngircd/ngircd.conf"
4b18b1523ec2 Updated irc tasks.
Luke Hoersten <luke@hoersten.org>
parents: 43
diff changeset
    20
    regexp: '^	Listen ='
4b18b1523ec2 Updated irc tasks.
Luke Hoersten <luke@hoersten.org>
parents: 43
diff changeset
    21
    line: "	Listen = 127.0.0.1"
4b18b1523ec2 Updated irc tasks.
Luke Hoersten <luke@hoersten.org>
parents: 43
diff changeset
    22
    insertafter: "^	;Listen ="
4b18b1523ec2 Updated irc tasks.
Luke Hoersten <luke@hoersten.org>
parents: 43
diff changeset
    23
  notify: restart ngircd
4b18b1523ec2 Updated irc tasks.
Luke Hoersten <luke@hoersten.org>
parents: 43
diff changeset
    24
4b18b1523ec2 Updated irc tasks.
Luke Hoersten <luke@hoersten.org>
parents: 43
diff changeset
    25
- name: config motd
4b18b1523ec2 Updated irc tasks.
Luke Hoersten <luke@hoersten.org>
parents: 43
diff changeset
    26
  become: yes
4b18b1523ec2 Updated irc tasks.
Luke Hoersten <luke@hoersten.org>
parents: 43
diff changeset
    27
  lineinfile:
4b18b1523ec2 Updated irc tasks.
Luke Hoersten <luke@hoersten.org>
parents: 43
diff changeset
    28
    path: "/etc/ngircd/ngircd.conf"
4b18b1523ec2 Updated irc tasks.
Luke Hoersten <luke@hoersten.org>
parents: 43
diff changeset
    29
    regexp: '^	Info ='
4b18b1523ec2 Updated irc tasks.
Luke Hoersten <luke@hoersten.org>
parents: 43
diff changeset
    30
    line: "	Info = {{ngircd_motd}}"
4b18b1523ec2 Updated irc tasks.
Luke Hoersten <luke@hoersten.org>
parents: 43
diff changeset
    31
  notify: restart ngircd
4b18b1523ec2 Updated irc tasks.
Luke Hoersten <luke@hoersten.org>
parents: 43
diff changeset
    32
4b18b1523ec2 Updated irc tasks.
Luke Hoersten <luke@hoersten.org>
parents: 43
diff changeset
    33
- name: copy motd file
43
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    34
  become: yes
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    35
  copy:
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    36
    src: "{{ngircd_motd_src}}"
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    37
    dest: "/etc/ngircd/ngircd.motd"
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    38
    mode: "0644"
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    39
  notify: restart ngircd
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    40
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    41
- name: start ngircd service
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    42
  become: yes
b86f3fc9fb6f Added ngircd.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    43
  systemd: name="ngircd" state="started" daemon_reload="yes"