--- - name: "[OpenRC] Enable and start service: acme-redirect" service: name: acme-redirect enabled: yes state: started when: - ansible_service_mgr == "openrc" - name: "[systemd] Enable and start service: acme-redirect" systemd: name: acme-redirect enabled: yes state: started when: - ansible_service_mgr == "systemd" - name: "[systemd] Enable and start systemd-timer: acme-redirect-renew" systemd: name: acme-redirect-renew.timer enabled: yes state: started when: - ansible_service_mgr == "systemd"