暫無描述
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.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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/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
  34. # NOTE: you should probably just generate this using the directions above and then edit via the web panel
  35. #- name: Copy znc configuration file into place
  36. # template: src=var_lib_znc_configs_znc.conf.j2 dest=/var/lib/znc/configs/znc.conf owner=znc group=znc
  37. - name: Ensure znc is a system service
  38. command: update-rc.d znc defaults
  39. notify: restart znc