Fix GUI run on WSL
This commit is contained in:
parent
78e2a1b6e8
commit
a8cf690c31
3 changed files with 23 additions and 2 deletions
|
@ -13,6 +13,26 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Check if an ostree OS (e.g. Silverblue)
|
||||
ansible.builtin.stat:
|
||||
path: /run/ostree-booted
|
||||
register: check_ostree
|
||||
- name: Check for WSL
|
||||
ansible.builtin.shell: 'grep microsoft /proc/version || /bin/true'
|
||||
changed_when: false
|
||||
register: check_wsl
|
||||
|
||||
- name: Register ostree fact
|
||||
ansible.builtin.set_fact:
|
||||
ostree: check_ostree.exists
|
||||
- name: Default wsl fact
|
||||
ansible.builtin.set_fact:
|
||||
wsl: false
|
||||
- name: Register wsl fact
|
||||
ansible.builtin.set_fact:
|
||||
wsl: true
|
||||
when: '"microsoft" in check_wsl.stdout'
|
||||
|
||||
- import_tasks: shell.yml
|
||||
|
||||
- import_tasks: dirs.yml
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
- import_tasks: dotfiles.yml
|
||||
- import_tasks: flatpak.yml
|
||||
when: wsl == false
|
||||
- import_tasks: firefox.yml
|
||||
- import_tasks: gnome.yml
|
||||
- import_tasks: mate.yml
|
||||
|
|
|
@ -14,10 +14,10 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Setup GUI for user only
|
||||
- name: Setup CLI for user only
|
||||
hosts: all
|
||||
vars:
|
||||
gui: true
|
||||
gui: false
|
||||
tasks:
|
||||
- include_role:
|
||||
name: home-cli
|
||||
|
|
Loading…
Reference in a new issue