From 2bdcef938c5b70dc5f0b8350af4aff18a1b77217 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sun, 11 Jul 2021 11:55:42 -0500 Subject: [PATCH] Change to checking if gdm3 already exists. --- tasks/workstation/linux/software/gnome.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tasks/workstation/linux/software/gnome.yml b/tasks/workstation/linux/software/gnome.yml index a89f40a..3ce0b6c 100644 --- a/tasks/workstation/linux/software/gnome.yml +++ b/tasks/workstation/linux/software/gnome.yml @@ -1,24 +1,28 @@ # Some Linux distros come with meh DE's, this fixes that. +- name: Workstation | Linux | Software | GNOME | Check (Parrot OS Only) + shell: which gdm3 + register: gnome_install + when: ansible_distribution in ("Parrot OS") + - name: Workstation | Linux | Software | GNOME | Install package: name: - gnome - gdm3 state: present - register: gnome_install - when: ansible_distribution in ("Parrot OS") + when: gnome_install is defined and gnome_install.failed - name: Workstation | Linux | Software | GNOME | TEST debug: var: gnome_install - when: gnome_install is defined and gnome_install.changed + when: gnome_install is defined and gnome_install.failed - name: Workstation | Linux | Software | GNOME | Note Before Exiting debug: msg: "You will probably need to run `dpkg-reconfigure gdm3` to ensure gdm3 is selected." - when: gnome_install is defined and gnome_install.changed + when: gnome_install is defined and gnome_install.failed - name: Workstation | Linux | Software | GNOME | Exiting shell: exit 1 - when: gnome_install is defined and gnome_install.changed \ No newline at end of file + when: gnome_install is defined and gnome_install.failed \ No newline at end of file