Stop checking for WSL

This commit is contained in:
Anthony Rose 2022-11-28 08:56:52 +00:00
parent 1d9e33f1cd
commit a300cdbc90
11 changed files with 8 additions and 20 deletions

View file

@ -18,7 +18,6 @@
hosts: all hosts: all
vars: vars:
gui: false gui: false
wsl_distro: "{{ lookup('env', 'WSL_DISTRO_NAME') }}"
tasks: tasks:
- name: Include main - name: Include main
ansible.builtin.include_tasks: main.yml ansible.builtin.include_tasks: main.yml

View file

@ -18,7 +18,6 @@
hosts: all hosts: all
vars: vars:
gui: true gui: true
wsl_distro: "{{ lookup('env', 'WSL_DISTRO_NAME') }}"
tasks: tasks:
- name: Include main - name: Include main
ansible.builtin.include_tasks: main.yml ansible.builtin.include_tasks: main.yml

View file

@ -21,7 +21,6 @@
- import_tasks: modules.yml - import_tasks: modules.yml
- import_tasks: ssh.yml - import_tasks: ssh.yml
- import_tasks: solokeys.yml - import_tasks: solokeys.yml
when: wsl_distro is not defined
- import_tasks: sudo.yml - import_tasks: sudo.yml
- import_tasks: vscode.yml - import_tasks: vscode.yml
when: gui == true when: gui == true

View file

@ -26,10 +26,9 @@
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 and wsl_distro is not defined when: changed_ssh_config.changed == true

View file

@ -24,7 +24,7 @@
enabled: no enabled: no
masked: yes masked: yes
state: stopped state: stopped
when: packagekitservice.stat.exists and wsl_distro is not defined when: packagekitservice.stat.exists
- name: Disable PackageKit offline updates - name: Disable PackageKit offline updates
become: true become: true
ansible.builtin.systemd: ansible.builtin.systemd:
@ -32,11 +32,10 @@
enabled: no enabled: no
masked: yes masked: yes
state: stopped state: stopped
when: packagekitservice.stat.exists and wsl_distro is not defined when: packagekitservice.stat.exists
- name: Enable automatic updates - name: Enable automatic updates
become: true become: true
ansible.builtin.systemd: ansible.builtin.systemd:
name: dnf-automatic-install.timer name: dnf-automatic-install.timer
enabled: yes enabled: yes
state: started state: started
when: wsl_distro is not defined

View file

@ -22,8 +22,8 @@
- name: Reload udevadm rules - name: Reload udevadm rules
become: true become: true
ansible.builtin.command: udevadm control --reload-rules ansible.builtin.command: udevadm control --reload-rules
when: solokeys_copy.changed and wsl_distro is not defined when: solokeys_copy.changed
- name: Trigger udevadm - name: Trigger udevadm
become: true become: true
ansible.builtin.command: udevadm trigger ansible.builtin.command: udevadm trigger
when: solokeys_copy.changed and wsl_distro is not defined when: solokeys_copy.changed

View file

@ -26,13 +26,12 @@
name: sshd.service name: sshd.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: sshd.service name: sshd.service
state: restarted state: restarted
when: changed_ssh_config.changed == true and wsl_distro is not defined when: changed_ssh_config.changed == true
- name: Check for firewalld - name: Check for firewalld
ansible.builtin.stat: ansible.builtin.stat:
path: /usr/sbin/firewalld path: /usr/sbin/firewalld

View file

@ -26,10 +26,9 @@
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 and wsl_distro is not defined when: changed_ssh_config.changed == true

View file

@ -18,6 +18,4 @@
when: gui == true when: gui == true
- import_tasks: modules.yml - import_tasks: modules.yml
- import_tasks: ssh.yml - import_tasks: ssh.yml
when: wsl_distro is not defined
- import_tasks: solokeys.yml - import_tasks: solokeys.yml
when: wsl_distro is not defined

View file

@ -18,6 +18,4 @@
when: gui == true when: gui == true
- import_tasks: modules.yml - import_tasks: modules.yml
- import_tasks: ssh.yml - import_tasks: ssh.yml
when: wsl_distro is not defined
- import_tasks: solokeys.yml - import_tasks: solokeys.yml
when: wsl_distro is not defined

View file

@ -26,10 +26,9 @@
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 and wsl_distro is not defined when: changed_ssh_config.changed == true