--- - name: znc - install package pkgng: name: znc state: present - name: znc - create data and config directory file: path: "{{ znc.data_dir }}/configs" state: directory recurse: true owner: znc group: znc mode: 0700 - name: znc - generate config file template: src: znc.conf.j2 dest: "{{ znc.data_dir }}/configs/znc.conf" owner: znc group: znc mode: 0600 notify: reload-znc - name: znc - generate SSL cert deploy script template: src: deploy_ssl.sh.j2 dest: "{{ znc.data_dir }}/deploy_ssl.sh" mode: 0755 - name: znc - deploy SSL cert command: sh {{ znc.data_dir }}/deploy_ssl.sh - name: znc - enable service blockinfile: path: /etc/rc.conf marker: "# {mark} ANSIBLE MANAGED - znc" block: | znc_conf_dir="{{ znc.data_dir }}" znc_enable="YES" - name: znc - start service service: name: znc state: started - name: acme - add znc to deploy lineinfile: path: "{{ web.acme_home }}/deploy.local.sh" line: sh {{ znc.data_dir }}/deploy_ssl.sh tags: acme