Нет описания
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # more or less as per http://wiki.znc.in/Running_ZNC_as_a_system_daemon
  2. - name: Install znc dependencies
  3. apt: pkg={{ item }} state=installed
  4. with_items:
  5. - build-essential
  6. - libssl-dev
  7. - openssl
  8. - swig
  9. - automake
  10. - libtool
  11. - libsasl2-dev
  12. - checkinstall
  13. - g++
  14. - pkg-config
  15. - python3-dev
  16. - libperl-dev
  17. - name: Download znc release
  18. get_url: url=http://znc.in/releases/archive/znc-{{ znc_version }}.tar.gz dest=/root/znc-{{ znc_version }}.tar.gz
  19. - name: Decompress znc source
  20. command: tar xzf /root/znc-{{ znc_version }}.tar.gz chdir=/root creates=/root/znc-{{ znc_version }}/configure
  21. - name: Build and install znc
  22. shell: ./configure --enable-python ; make ; make install executable=/bin/bash chdir=/root/znc-{{ znc_version }} creates=/usr/local/bin/znc
  23. - name: Create znc group
  24. group: name=znc state=present
  25. - name: Create znc user
  26. user: name=znc state=present home=/var/lib/znc system=yes group=znc
  27. - name: Copy znc init file into place
  28. copy: src=etc_init.d_znc dest=/etc/init.d/znc mode=0755
  29. - name: Create a combined version of the private key with public cert and intermediate + root CAs
  30. shell: cat /etc/ssl/private/wildcard_private.key /etc/ssl/certs/wildcard_combined.pem >
  31. /var/lib/znc/znc.pem creates=/var/lib/znc/znc.pem
  32. - name: Ensure znc user and group can read cert
  33. file: path=/var/lib/znc/znc.pem group=znc owner=znc mode=640
  34. - name: Check for existing config file
  35. command: cat /var/lib/znc/configs/znc.conf
  36. register: znc_config
  37. ignore_errors: True
  38. changed_when: False # never report as "changed"
  39. - name: Create znc config directory
  40. file: state=directory path=/var/lib/znc/configs group=znc owner=znc
  41. - name: Copy znc configuration file into place
  42. template: src=var_lib_znc_configs_znc.conf.j2 dest=/var/lib/znc/configs/znc.conf owner=znc group=znc
  43. when: znc_config.rc != 0
  44. - name: Ensure znc is a system service
  45. service: name=znc state=started enabled=true