aboutsummaryrefslogtreecommitdiffstats
path: root/roles/znc/tasks
diff options
context:
space:
mode:
authorbinary <me@rgoncalves.se>2021-02-26 18:05:34 +0100
committerbinary <me@rgoncalves.se>2021-02-26 18:05:34 +0100
commitbd07a58f411e0519d88c93c626a54a3a81e91d85 (patch)
treed3f93688c76403630dbf93d543fba0d85027a3e0 /roles/znc/tasks
parentdba42efaae5544cf66494a28aa251cb003fee1fb (diff)
downloadinfrastructure-bd07a58f411e0519d88c93c626a54a3a81e91d85.tar.gz
Add znc role for domain controller
Diffstat (limited to 'roles/znc/tasks')
-rw-r--r--roles/znc/tasks/main.yml32
1 files changed, 32 insertions, 0 deletions
diff --git a/roles/znc/tasks/main.yml b/roles/znc/tasks/main.yml
new file mode 100644
index 0000000..6161a05
--- /dev/null
+++ b/roles/znc/tasks/main.yml
@@ -0,0 +1,32 @@
+
+# znc ~~ roles/znc/tasks/main.yml
+# Init znc user, daemon and settings
+
+---
+
+- name: ensure znc package is present
+ package: name=znc state=present
+
+- name: ensure znc group exists
+ group:
+ name: "{{ znc_group }}"
+ state: present
+
+- name: ensure znc user exists
+ user:
+ name: "{{ znc_user }}"
+ group: "{{ znc_group }}"
+ system: true
+ create_home: false
+
+- name: generate and enable znc daemon
+ include_role: name=rc
+ vars:
+ rc_cmd: /usr/local/bin/znc
+ rc_args: ""
+ rc_name: znc
+ rc_user: "{{ znc_user }}"
+
+- name: show hints for generating configuration
+ debug:
+ msg: Please generate the znc configuration with `znc --makeconf` as user "{{ znc_user }}"
remember that computers suck.