aboutsummaryrefslogtreecommitdiffstats
path: root/roles/znc/tasks/main.yml
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-12-15 18:21:45 +0000
committerRomain Gonçalves <me@rgoncalves.se>2021-12-15 21:39:50 +0000
commit5b1794525701c987bfb80fbb7c3f2c2c379864ed (patch)
treec845ea5c38fe10a134df0daabeae66c8300c1762 /roles/znc/tasks/main.yml
parent2927544ce379f607670768cc61252039c627058a (diff)
downloadrules-5b1794525701c987bfb80fbb7c3f2c2c379864ed.tar.gz
roles: Add Znc and apply to dc0 host
Diffstat (limited to 'roles/znc/tasks/main.yml')
-rw-r--r--roles/znc/tasks/main.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/roles/znc/tasks/main.yml b/roles/znc/tasks/main.yml
new file mode 100644
index 0000000..a1ccf3d
--- /dev/null
+++ b/roles/znc/tasks/main.yml
@@ -0,0 +1,30 @@
+- name: install znc
+ package:
+ name: znc
+ state: present
+
+- name: create znc group
+ group:
+ name: "{{ znc_group }}"
+ state: present
+
+- name: create znc user
+ user:
+ name: "{{ znc_user }}"
+ group: "{{ znc_group }}"
+ system: true
+ create_home: true
+
+- name: generate and enable znc service
+ include_role:
+ name: rc
+ vars:
+ rc_cmd: /usr/local/bin/znc
+ rc_user: "{{ znc_user }}"
+ rc_name: znc
+
+- name: enable and start znc
+ service:
+ name: znc
+ state: restarted
+ enabled: true
remember that computers suck.