Fix GNOME Install For Ubuntu 20.04 (#6)

* If we're gonig to exit then we should be more sure about our messaging.

* Only have GIMP installed from Flatpak.

* Playbook is causing Ubuntu 20.04 to fail.

* Define gnome_install.failed since some Ansible versions are picky.

* Try again for mad non-Parrot versions of Ansible.

* Add debug.

* Still trying to make Ubuntu 20.04's Ansible happy.

* Fix typos.

* Ubuntu does not need to install Dash To Dock. Also ensure `make` is installed on other distros so that the project is compiled.

* Remove debug.
This commit is contained in:
Hyperling 2021-08-09 08:09:16 -05:00 committed by GitHub
parent 2383183164
commit 3dec7e7d82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 25 deletions

View File

@ -178,4 +178,5 @@
- vscode - vscode
- code - code
- '*libreoffice*' - '*libreoffice*'
- gimp
state: absent state: absent

View File

@ -12,18 +12,13 @@
- gnome - gnome
- gdm3 - gdm3
state: present state: present
when: gnome_install is defined and gnome_install.failed when: gnome_install is defined and gnome_install.failed is defined and gnome_install.failed
- name: Workstation | Linux | Software | GNOME | TEST
debug:
var: gnome_install
when: gnome_install is defined and gnome_install.failed
- name: Workstation | Linux | Software | GNOME | Note Before Exiting - name: Workstation | Linux | Software | GNOME | Note Before Exiting
debug: debug:
msg: "You will probably need to run `dpkg-reconfigure gdm3` to ensure gdm3 is selected." msg: "You will need to run `dpkg-reconfigure gdm3` to ensure gdm3 is selected."
when: gnome_install is defined and gnome_install.failed when: gnome_install is defined and gnome_install.failed is defined and gnome_install.failed
- name: Workstation | Linux | Software | GNOME | Exiting - name: Workstation | Linux | Software | GNOME | Exiting
shell: exit 1 shell: exit 1
when: gnome_install is defined and gnome_install.failed when: gnome_install is defined and gnome_install.failed is defined and gnome_install.failed

View File

@ -47,12 +47,19 @@
force: no force: no
version: master version: master
become_user: ling become_user: ling
when: dash_to_dock_exists.failed when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
- name: Workstation | Account Management | GNOME | Dash To Dock | Install | Dependencies
package:
name:
- make
state: present
when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
- name: Workstation | Account Management | GNOME | Dash To Dock | Install | Make - name: Workstation | Account Management | GNOME | Dash To Dock | Install | Make
shell: "cd ~/TRASH/dash-to-dock/; make; make install" shell: "cd ~/TRASH/dash-to-dock/; make; make install"
become_user: ling become_user: ling
when: dash_to_dock_exists.failed when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
- name: Workstation | Account Management | GNOME | Dash To Dock | Read Enabled Extension Array - name: Workstation | Account Management | GNOME | Dash To Dock | Read Enabled Extension Array
dconf: dconf:
@ -60,12 +67,12 @@
state: read state: read
become_user: ling become_user: ling
register: gnome_enabled_extensions register: gnome_enabled_extensions
when: dash_to_dock_exists.failed when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
- name: Workstation | Account Management | GNOME | Dash To Dock | dconf Return Object - name: Workstation | Account Management | GNOME | Dash To Dock | dconf Return Object
debug: debug:
var: gnome_enabled_extensions var: gnome_enabled_extensions
when: dash_to_dock_exists.failed when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
# https://ansible-docs.readthedocs.io/zh/stable-2.0/rst/playbooks_filters.html#filters-for-formatting-data # https://ansible-docs.readthedocs.io/zh/stable-2.0/rst/playbooks_filters.html#filters-for-formatting-data
@ -73,42 +80,42 @@
set_fact: set_fact:
gnome_enabled_extensions: "{{ gnome_enabled_extensions.value | replace('@as ', '') }}" gnome_enabled_extensions: "{{ gnome_enabled_extensions.value | replace('@as ', '') }}"
dash_to_dock_ext_comma: "" dash_to_dock_ext_comma: ""
when: dash_to_dock_exists.failed when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
- name: Workstation | Account Management | GNOME | Dash To Dock | After replace() - name: Workstation | Account Management | GNOME | Dash To Dock | After replace()
debug: debug:
var: gnome_enabled_extensions var: gnome_enabled_extensions
when: dash_to_dock_exists.failed when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
- name: Workstation | Account Management | GNOME | Dash To Dock | Variables 2 - name: Workstation | Account Management | GNOME | Dash To Dock | Variables 2
set_fact: set_fact:
dash_to_dock_ext_comma: ", " dash_to_dock_ext_comma: ", "
when: dash_to_dock_exists.failed and gnome_enabled_extensions not in ("[]", [], "None") when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed and gnome_enabled_extensions not in ("[]", [], "None")
- name: Workstation | Account Management | GNOME | Dash To Dock | Variables 3 - name: Workstation | Account Management | GNOME | Dash To Dock | Variables 3
set_fact: set_fact:
dash_to_dock_ext_name: "{{ dash_to_dock_ext_comma }}'dash-to-dock@micxgx.gmail.com']" dash_to_dock_ext_name: "{{ dash_to_dock_ext_comma }}'dash-to-dock@micxgx.gmail.com']"
when: dash_to_dock_exists.failed when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
- name: Workstation | Account Management | GNOME | Dash To Dock | Variables 4 - name: Workstation | Account Management | GNOME | Dash To Dock | Variables 4
set_fact: set_fact:
gnome_enabled_extensions: "[]" gnome_enabled_extensions: "[]"
when: dash_to_dock_exists.failed and gnome_enabled_extensions == "None" when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed and gnome_enabled_extensions == "None"
- name: Workstation | Account Management | GNOME | Dash To Dock | Print Value To Append With - name: Workstation | Account Management | GNOME | Dash To Dock | Print Value To Append With
debug: debug:
var: dash_to_dock_ext_name var: dash_to_dock_ext_name
when: dash_to_dock_exists.failed when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
- name: Workstation | Account Management | GNOME | Dash To Dock | Print Value To Append To - name: Workstation | Account Management | GNOME | Dash To Dock | Print Value To Append To
debug: debug:
var: gnome_enabled_extensions var: gnome_enabled_extensions
when: dash_to_dock_exists.failed when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
- name: Workstation | Account Management | GNOME | Dash To Dock | Print Combined Value - name: Workstation | Account Management | GNOME | Dash To Dock | Print Combined Value
debug: debug:
msg: "{{ gnome_enabled_extensions | replace(']', dash_to_dock_ext_name) }}" msg: "{{ gnome_enabled_extensions | replace(']', dash_to_dock_ext_name) }}"
when: dash_to_dock_exists.failed when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
- name: Workstation | Account Management | GNOME | Dash To Dock | Enable - name: Workstation | Account Management | GNOME | Dash To Dock | Enable
dconf: dconf:
@ -116,7 +123,7 @@
value: "{{ gnome_enabled_extensions | replace(']', dash_to_dock_ext_name) }}" value: "{{ gnome_enabled_extensions | replace(']', dash_to_dock_ext_name) }}"
state: present state: present
become_user: ling become_user: ling
when: dash_to_dock_exists.failed when: ansible_distribution not in ("Ubuntu") and dash_to_dock_exists.failed
# Settings # # Settings #