--- - name: systemctl restart ssh become: yes ansible.builtin.systemd: name: "{{ sshd__service }}" state: restarted when: sshd__service is defined