mirror of
https://github.com/ThunixdotNet/ansible.git
synced 2026-01-25 13:40:17 +00:00
Adding znc stuff
This commit is contained in:
@@ -5,3 +5,4 @@
|
||||
- include: users.yml
|
||||
- include: apache2-mods.yml
|
||||
- include: ufw.yml
|
||||
- include: znc.yml
|
||||
|
||||
15
roles/shell/tasks/users/z00t.yml
Normal file
15
roles/shell/tasks/users/z00t.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
- name: Setting up z00t
|
||||
user:
|
||||
name: z00t
|
||||
groups: tilde
|
||||
state: present
|
||||
skeleton: /etc/skel
|
||||
shell: /bin/bash
|
||||
system: no
|
||||
createhome: yes
|
||||
home: /home/z00t
|
||||
- authorized_key:
|
||||
user: z00t
|
||||
state: present
|
||||
key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDVLpxuui5LZYqnmPQU2jFesWjGGKx0rmJaU6TkqBMBNa3rVXN7AWfCM3+Wg5x/kLp75uzFjRUzkODCRo+YW8dRMOYPFxQsVT2NB102iX71hNS4NuP4GMgNxHzXk5WWekhYMCfhlMaoUYflVt5lqdUXvxSPnxUbkrh29DKK1r5bwQ1AVZy7Ib/wZZ4Z03UXq8lMAQqznKFpg0gn5rY/x1VFP9MYWu1GfMdDKsAIvsYA1/o2pHMPanDunkZlS6HdI9t08/qhkMhmH+HJrXyQa3KxkmT/5H/d89VKCjZRcCu0o+p7w9J2HGn9FTZKwoFv0nV+/i6Zfov6ptf4Bgm8A3NZ"
|
||||
59
roles/shell/tasks/znc.yml
Normal file
59
roles/shell/tasks/znc.yml
Normal file
@@ -0,0 +1,59 @@
|
||||
# Install our baseline packages for all machines, irrespective of what role they might have
|
||||
---
|
||||
- name: Create home dirs for znc
|
||||
file:
|
||||
path: /var/lib/znc/.znc
|
||||
state: directory
|
||||
owner: znc
|
||||
group: root
|
||||
mode: 770
|
||||
recurse: yes
|
||||
|
||||
- name: Create znc run dir
|
||||
file:
|
||||
path: /var/run/znc
|
||||
state: directory
|
||||
owner: znc
|
||||
group: root
|
||||
mode: 770
|
||||
|
||||
- name: Install crontab target
|
||||
copy:
|
||||
dest: /etc/systemd/system/znc.service
|
||||
content: |
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
[Unit]
|
||||
Description=Simulates cron, limited to /etc/cron.*
|
||||
Requires=crontab@hourly.timer
|
||||
Requires=crontab@daily.timer
|
||||
Requires=crontab@weekly.timer
|
||||
Requires=crontab@monthly.timer
|
||||
|
||||
[Unit]
|
||||
Description=ZNC, an advanced IRC bouncer
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/znc -f --datadir=/var/lib/znc/.znc
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
User=znc
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
- name: Install znc_newaccount
|
||||
copy:
|
||||
src: ../files/var/lib/znc/znc_account.newconf
|
||||
dest: /var/lib/znc/znc_account.newconf
|
||||
owner: znc
|
||||
group: root
|
||||
mode: 660
|
||||
|
||||
- name: Install znc user script
|
||||
copy:
|
||||
src: ../files/var/lib/znc/create-znc_account.sh
|
||||
dest: /var/lib/znc/create-znc_account.sh
|
||||
owner: znc
|
||||
group: root
|
||||
mode: 770
|
||||
Reference in New Issue
Block a user