Add option to install shell extensions for multiple users

This commit is contained in:
2021-09-12 22:54:52 +02:00
parent fc39b3006b
commit e3614e2572
6 changed files with 31 additions and 8 deletions

View File

@@ -4,4 +4,4 @@
name: "{{ item.key }}"
shell: "{{ item.value.shell }}"
become: yes
loop: "{{ lookup('dict', etc_users, wantlist=True) }}"
loop: "{{ lookup('dict', users, wantlist=True) }}"

View File

@@ -0,0 +1,3 @@
---
home_place_dotfiles: false
home_configure_gnome: true

View File

@@ -0,0 +1,7 @@
---
- name: Compile glib schemas
ansible.builtin.command:
cmd: "glib-compile-schemas /home/{{ item[0] }}/.local/share/gnome-shell/extensions/{{ item[1].value.extension_uuid }}/schemas"
with_nested:
- "{{ users }}"
- "{{ home_gnome_shell_extensions | dict2items }}"

View File

@@ -0,0 +1,9 @@
---
- name: Install GNOME Shell Extensions
ansible.builtin.git:
repo: "{{ item[1].key }}"
dest: "/home/{{ item[0] }}/.local/share/gnome-shell/extensions/{{ item[1].value.extension_uuid }}"
with_nested:
- "{{ users }}"
- "{{ home_gnome_shell_extensions | dict2items }}"
notify: Compile glib schemas

View File

@@ -1,4 +1,8 @@
---
- name: Include dotfiles.yml
ansible.builtin.include: dotfiles.yml
when: home_place_dotfiles | bool
when: home_place_dotfiles | bool
- name: Include gnome.yml
ansible.builtin.include: gnome.yml
when: home_configure_gnome | bool