--- - name: Add user 'maddy' to group 'acme-redirect' user: name: maddy groups: acme-redirect append: yes when: - services.acme_redirect.enable is true - name: "Generate file: /etc/maddy/maddy.conf" template: src: maddy.conf.j2 dest: /etc/maddy/maddy.conf mode: 0644 owner: maddy group: maddy notify: "Restart maddy" - name: "Create file: /var/log/maddy.log" file: path: /var/log/maddy.log state: touch owner: maddy group: maddy mode: 0644 - name: "Patch file: /etc/init.d/maddy" patch: src: maddy-service.patch dest: /etc/init.d/maddy when: - ansible_service_mgr == "openrc"