Don't try to use systemd when in WSL
This commit is contained in:
parent
2e8665ce24
commit
ea6726ae98
2 changed files with 4 additions and 2 deletions
|
@ -26,9 +26,10 @@
|
||||||
name: ssh.service
|
name: ssh.service
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: started
|
state: started
|
||||||
|
when: wsl_distro is not defined
|
||||||
- name: Restart SSH
|
- name: Restart SSH
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: ssh.service
|
name: ssh.service
|
||||||
state: restarted
|
state: restarted
|
||||||
when: changed_ssh_config.changed == true
|
when: changed_ssh_config.changed == true and wsl_distro is not defined
|
||||||
|
|
|
@ -26,9 +26,10 @@
|
||||||
name: ssh.service
|
name: ssh.service
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: started
|
state: started
|
||||||
|
when: wsl_distro is not defined
|
||||||
- name: Restart SSH
|
- name: Restart SSH
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: ssh.service
|
name: ssh.service
|
||||||
state: restarted
|
state: restarted
|
||||||
when: changed_ssh_config.changed == true
|
when: changed_ssh_config.changed == true and wsl_distro is not defined
|
||||||
|
|
Loading…
Reference in a new issue