Browse Source

IRC bouncer corrected

master
theonlydoo 9 years ago
parent
commit
80fa45eb99
4 changed files with 30 additions and 19 deletions
  1. +7
    -7
      README.md
  2. +7
    -6
      host_vars/localhost.example
  3. +11
    -0
      ircbouncer.yml
  4. +5
    -6
      roles/ircbouncer/tasks/znc.yml

+ 7
- 7
README.md View File

@ -24,7 +24,6 @@ roles
* IRCBouncer
* Provides a ZNC Config
* Imported with <3 from https://github.com/al3x/sovereign/
* **Not yet READY**
* Mail
* provides a complete **mail** server for a given domain name and the vdomain capability for other domains.
* **Note** : This role starts in order : common, mariadb, and mail. If you don't want one of them, please comment out.
@ -75,12 +74,13 @@ mysql_host: localhost
# ircbouncer
znc_version: 1.4
irc_nick: (required)
irc_ident: (required)
irc_realname: (required)
irc_quitmsg: (required)
irc_password_hash: (required)
irc_password_salt: (required)
irc_nick: (required)
irc_ident: (required)
irc_realname: (required)
irc_quitmsg: (required)
irc_password_hash: (required) # http://wiki.znc.in/Configuration#Pass
irc_password_salt: (required) # http://wiki.znc.in/Configuration#Pass
irc_timezone: "Europe/Paris" #Example: "Europe/Paris"
# xmpp
prosody_admin: "admin@test.net"

+ 7
- 6
host_vars/localhost.example View File

@ -22,12 +22,13 @@ mysql_host: localhost
# ircbouncer
znc_version: 1.4
irc_nick: (required)
irc_ident: (required)
irc_realname: (required)
irc_quitmsg: (required)
irc_password_hash: (required)
irc_password_salt: (required)
irc_nick: (required)
irc_ident: (required)
irc_realname: (required)
irc_quitmsg: (required)
irc_password_hash: (required) # http://wiki.znc.in/Configuration#Pass
irc_password_salt: (required) # http://wiki.znc.in/Configuration#Pass
irc_timezone: "Europe/Paris" #Example: "Europe/Paris"
# xmpp
prosody_admin: admin@test.net

+ 11
- 0
ircbouncer.yml View File

@ -0,0 +1,11 @@
---
- name: Deployer et configurer ZNC
hosts: all
user: root
gather_facts: yes
roles:
- ircbouncer
# vim: set textwidth=0 ft=yaml ts=2 sw=2 expandtab:

+ 5
- 6
roles/ircbouncer/tasks/znc.yml View File

@ -35,11 +35,13 @@
- name: Copy znc init file into place
copy: src=etc_init.d_znc dest=/etc/init.d/znc mode=0755
- name: Create a combined version of the private key with public cert and intermediate + root CAs
shell: cat /etc/ssl/private/wildcard_private.key /etc/ssl/certs/wildcard_combined.pem >
/var/lib/znc/znc.pem creates=/var/lib/znc/znc.pem
- name: create self-signed SSL cert
command: openssl req -new -nodes -x509 -subj "/C=FR/ST=SomeWhere/L=OverTheRainBow/O=znc/CN=znc.{{ domain }}" -days 3650 -keyout /root/znc.key -out /root/znc.crt -extensions v3_ca creates=/root/znc.crt
notify: restart znc
- name: create self-signed SSL cert-2
shell: cat /root/znc.crt > /var/lib/znc/znc.pem && cat /root/znc.crt >> /root/znc.key
- name: Ensure znc user and group can read cert
file: path=/var/lib/znc/znc.pem group=znc owner=znc mode=640
notify: restart znc
@ -58,8 +60,5 @@
when: znc_config.rc != 0
notify: restart znc
- name: Set firewall rule for znc
ufw: rule=allow port=6697 proto=tcp
- name: Ensure znc is a system service
service: name=znc state=started enabled=true

Loading…
Cancel
Save