From a300cdbc90689c024c3377b335ff7ce26799c91e Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Mon, 28 Nov 2022 08:56:52 +0000 Subject: [PATCH] Stop checking for WSL --- admin-cli.yml | 1 - admin-gui.yml | 1 - roles/debian/tasks/main.yml | 1 - roles/debian/tasks/ssh.yml | 3 +-- roles/fedora/tasks/packagekit.yml | 5 ++--- roles/fedora/tasks/solokeys.yml | 4 ++-- roles/fedora/tasks/ssh.yml | 3 +-- roles/kali/tasks/ssh.yml | 3 +-- roles/opensuse-leap/tasks/main.yml | 2 -- roles/opensuse-tumbleweed/tasks/main.yml | 2 -- roles/ubuntu/tasks/ssh.yml | 3 +-- 11 files changed, 8 insertions(+), 20 deletions(-) diff --git a/admin-cli.yml b/admin-cli.yml index a4a673d..0efc624 100755 --- a/admin-cli.yml +++ b/admin-cli.yml @@ -18,7 +18,6 @@ hosts: all vars: gui: false - wsl_distro: "{{ lookup('env', 'WSL_DISTRO_NAME') }}" tasks: - name: Include main ansible.builtin.include_tasks: main.yml diff --git a/admin-gui.yml b/admin-gui.yml index 05609c8..d2c90fd 100755 --- a/admin-gui.yml +++ b/admin-gui.yml @@ -18,7 +18,6 @@ hosts: all vars: gui: true - wsl_distro: "{{ lookup('env', 'WSL_DISTRO_NAME') }}" tasks: - name: Include main ansible.builtin.include_tasks: main.yml diff --git a/roles/debian/tasks/main.yml b/roles/debian/tasks/main.yml index 3a96e90..6af596e 100644 --- a/roles/debian/tasks/main.yml +++ b/roles/debian/tasks/main.yml @@ -21,7 +21,6 @@ - import_tasks: modules.yml - import_tasks: ssh.yml - import_tasks: solokeys.yml - when: wsl_distro is not defined - import_tasks: sudo.yml - import_tasks: vscode.yml when: gui == true diff --git a/roles/debian/tasks/ssh.yml b/roles/debian/tasks/ssh.yml index 39ea688..bd668c2 100644 --- a/roles/debian/tasks/ssh.yml +++ b/roles/debian/tasks/ssh.yml @@ -26,10 +26,9 @@ 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 and wsl_distro is not defined + when: changed_ssh_config.changed == true diff --git a/roles/fedora/tasks/packagekit.yml b/roles/fedora/tasks/packagekit.yml index bc150bc..44d93d9 100644 --- a/roles/fedora/tasks/packagekit.yml +++ b/roles/fedora/tasks/packagekit.yml @@ -24,7 +24,7 @@ enabled: no masked: yes state: stopped - when: packagekitservice.stat.exists and wsl_distro is not defined + when: packagekitservice.stat.exists - name: Disable PackageKit offline updates become: true ansible.builtin.systemd: @@ -32,11 +32,10 @@ enabled: no masked: yes state: stopped - when: packagekitservice.stat.exists and wsl_distro is not defined + when: packagekitservice.stat.exists - name: Enable automatic updates become: true ansible.builtin.systemd: name: dnf-automatic-install.timer enabled: yes state: started - when: wsl_distro is not defined diff --git a/roles/fedora/tasks/solokeys.yml b/roles/fedora/tasks/solokeys.yml index bfc0920..feff9aa 100644 --- a/roles/fedora/tasks/solokeys.yml +++ b/roles/fedora/tasks/solokeys.yml @@ -22,8 +22,8 @@ - name: Reload udevadm rules become: true ansible.builtin.command: udevadm control --reload-rules - when: solokeys_copy.changed and wsl_distro is not defined + when: solokeys_copy.changed - name: Trigger udevadm become: true ansible.builtin.command: udevadm trigger - when: solokeys_copy.changed and wsl_distro is not defined + when: solokeys_copy.changed diff --git a/roles/fedora/tasks/ssh.yml b/roles/fedora/tasks/ssh.yml index 1cff345..078019c 100644 --- a/roles/fedora/tasks/ssh.yml +++ b/roles/fedora/tasks/ssh.yml @@ -26,13 +26,12 @@ name: sshd.service enabled: yes state: started - when: wsl_distro is not defined - name: Restart SSH become: true ansible.builtin.systemd: name: sshd.service state: restarted - when: changed_ssh_config.changed == true and wsl_distro is not defined + when: changed_ssh_config.changed == true - name: Check for firewalld ansible.builtin.stat: path: /usr/sbin/firewalld diff --git a/roles/kali/tasks/ssh.yml b/roles/kali/tasks/ssh.yml index 39ea688..bd668c2 100644 --- a/roles/kali/tasks/ssh.yml +++ b/roles/kali/tasks/ssh.yml @@ -26,10 +26,9 @@ 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 and wsl_distro is not defined + when: changed_ssh_config.changed == true diff --git a/roles/opensuse-leap/tasks/main.yml b/roles/opensuse-leap/tasks/main.yml index 432f8f7..5059480 100644 --- a/roles/opensuse-leap/tasks/main.yml +++ b/roles/opensuse-leap/tasks/main.yml @@ -18,6 +18,4 @@ when: gui == true - import_tasks: modules.yml - import_tasks: ssh.yml - when: wsl_distro is not defined - import_tasks: solokeys.yml - when: wsl_distro is not defined diff --git a/roles/opensuse-tumbleweed/tasks/main.yml b/roles/opensuse-tumbleweed/tasks/main.yml index 432f8f7..5059480 100644 --- a/roles/opensuse-tumbleweed/tasks/main.yml +++ b/roles/opensuse-tumbleweed/tasks/main.yml @@ -18,6 +18,4 @@ when: gui == true - import_tasks: modules.yml - import_tasks: ssh.yml - when: wsl_distro is not defined - import_tasks: solokeys.yml - when: wsl_distro is not defined diff --git a/roles/ubuntu/tasks/ssh.yml b/roles/ubuntu/tasks/ssh.yml index 39ea688..bd668c2 100644 --- a/roles/ubuntu/tasks/ssh.yml +++ b/roles/ubuntu/tasks/ssh.yml @@ -26,10 +26,9 @@ 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 and wsl_distro is not defined + when: changed_ssh_config.changed == true