mirror of
https://github.com/fscotto/infra.git
synced 2026-05-31 15:59:56 +00:00
Make GNOME extension installation idempotent
This commit is contained in:
@@ -153,6 +153,15 @@
|
|||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.uuid }}"
|
label: "{{ item.uuid }}"
|
||||||
|
|
||||||
|
- name: Check installed workstation GNOME extensions
|
||||||
|
tags: [packages, gnome]
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: "{{ user_home }}/.local/share/gnome-shell/extensions/{{ item.uuid }}/metadata.json"
|
||||||
|
loop: "{{ workstation_gnome_extensions | default([]) }}"
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.uuid }}"
|
||||||
|
register: workstation_gnome_extension_install_state
|
||||||
|
|
||||||
- name: Install workstation GNOME extensions from downloaded archives
|
- name: Install workstation GNOME extensions from downloaded archives
|
||||||
tags: [packages, gnome]
|
tags: [packages, gnome]
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
@@ -162,6 +171,14 @@
|
|||||||
loop: "{{ workstation_gnome_extensions | default([]) }}"
|
loop: "{{ workstation_gnome_extensions | default([]) }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.uuid }}"
|
label: "{{ item.uuid }}"
|
||||||
|
when: >-
|
||||||
|
not (
|
||||||
|
workstation_gnome_extension_install_state.results
|
||||||
|
| selectattr('item.uuid', 'equalto', item.uuid)
|
||||||
|
| map(attribute='stat.exists')
|
||||||
|
| first
|
||||||
|
| default(false)
|
||||||
|
)
|
||||||
|
|
||||||
- name: Read current workstation GNOME enabled extensions
|
- name: Read current workstation GNOME enabled extensions
|
||||||
tags: [gnome]
|
tags: [gnome]
|
||||||
|
|||||||
Reference in New Issue
Block a user