Bez popisu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

znc.yml 1.2KB

1234567891011121314151617181920212223242526272829303132333435
  1. # more or less as per http://wiki.znc.in/Running_ZNC_as_a_system_daemon
  2. - name: Install znc
  3. apt: pkg={{ item }} state=installed
  4. with_items:
  5. - znc
  6. - name: Create a combined version of the private key with public cert and intermediate + root CAs
  7. shell: cat /etc/ssl/private/wildcard_private.key /etc/ssl/certs/wildcard_combined.pem >
  8. /usr/lib/znc/znc.pem creates=/usr/lib/znc/znc.pem
  9. notify: restart znc
  10. - name: Ensure znc user and group can read cert
  11. file: path=/usr/lib/znc/znc.pem group=znc owner=znc mode=640
  12. notify: restart znc
  13. - name: Check for existing config file
  14. command: cat /usr/lib/znc/configs/znc.conf
  15. register: znc_config
  16. ignore_errors: True
  17. changed_when: False # never report as "changed"
  18. - name: Create znc config directory
  19. file: state=directory path=/usr/lib/znc/configs group=znc owner=znc
  20. - name: Copy znc configuration file into place
  21. template: src=usr_lib_znc_configs_znc.conf.j2 dest=/usr/lib/znc/configs/znc.conf owner=znc group=znc
  22. when: znc_config.rc != 0
  23. notify: restart znc
  24. - name: Set firewall rule for znc
  25. ufw: rule=allow port=6697 proto=tcp
  26. - name: Ensure znc is a system service
  27. service: name=znc state=started enabled=true