Don't try to use systemd when in WSL

This commit is contained in:
Anthony Rose 2021-03-18 16:35:01 +00:00
parent 2e8665ce24
commit ea6726ae98
2 changed files with 4 additions and 2 deletions

View file

@ -26,9 +26,10 @@
name: ssh.service
enabled: yes
state: started
when: wsl_distro is not defined
- name: Restart SSH
become: true
ansible.builtin.systemd:
name: ssh.service
state: restarted
when: changed_ssh_config.changed == true
when: changed_ssh_config.changed == true and wsl_distro is not defined

View file

@ -26,9 +26,10 @@
name: ssh.service
enabled: yes
state: started
when: wsl_distro is not defined
- name: Restart SSH
become: true
ansible.builtin.systemd:
name: ssh.service
state: restarted
when: changed_ssh_config.changed == true
when: changed_ssh_config.changed == true and wsl_distro is not defined