--- - name: Assert usage of systemd as an init system assert: that: ansible_service_mgr == 'systemd' msg: "This module only works with systemd" - name: Get systemd version command: systemctl --version changed_when: false check_mode: false register: __systemd_version tags: - skip_ansible_lint - name: Set systemd version fact set_fact: caddy_systemd_version: "{{ __systemd_version.stdout_lines[0].split(' ')[1] }}"