mirror of
https://github.com/roles-ansible/ansible_role_sshd.git
synced 2024-08-16 11:59:49 +02:00
14 lines
393 B
YAML
14 lines
393 B
YAML
---
|
|
- name: systemctl restart ssh
|
|
become: true
|
|
ansible.builtin.systemd:
|
|
name: "{{ sshd__service }}"
|
|
state: restarted
|
|
when: sshd__service is defined and ansible_service_mgr == 'systemd'
|
|
|
|
- name: service restart ssh
|
|
become: true
|
|
ansible.builtin.service:
|
|
name: "{{ sshd__service }}"
|
|
state: restarted
|
|
when: sshd__service is defined and ansible_service_mgr != 'systemd'
|