1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- # more or less as per http://wiki.znc.in/Running_ZNC_as_a_system_daemon
-
- - name: Install znc dependencies
- apt: pkg=$item state=installed
- with_items:
- - build-essential
- - libssl-dev
- - openssl
- - swig
- - automake
- - libtool
- - libsasl2-dev
- - checkinstall
- - g++
- - pkg-config
- - python3-dev
- - libperl-dev
-
- - name: Download znc release
- get_url: url=http://znc.in/releases/znc-${znc_version}.tar.gz dest=/root/znc-${znc_version}.tar.gz
-
- - name: Decompress znc source
- command: tar xzf /root/znc-${znc_version}.tar.gz chdir=/root creates=/root/znc-${znc_version}/configure
-
- - name: Build and install znc
- shell: ./configure --enable-python ; make ; make install executable=/bin/bash chdir=/root/znc-${znc_version} creates=/usr/local/bin/znc
-
- - name: Create znc group
- group: name=znc state=present
-
- - name: Create znc user
- user: name=znc state=present home=/var/lib/znc system=yes group=znc
-
- - name: Copy znc init file into place
- copy: src=etc_init.d_znc dest=/etc/init.d/znc mode=0755
-
- - name: Copy znc combined SSL cert into place
- copy: src=etc_ssl_znc-combined.pem dest=/etc/ssl/znc-combined.pem owner=znc group=znc
-
- # NOTE: you should probably just generate this using the directions above and then edit via the web panel
- #- name: Copy znc configuration file into place
- # template: src=var_lib_znc_configs_znc.conf.j2 dest=/var/lib/znc/configs/znc.conf owner=znc group=znc
-
- - name: Ensure znc is a system service
- command: update-rc.d znc defaults
- notify: restart znc
|