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

@@ -231,10 +231,6 @@ rpm_ostree_layered_packages:
zsh:
state: present
etc_users:
flexo:
shell: /bin/zsh
etc_firewalld:
syncthing:
zone: FedoraWorkstation
@@ -248,7 +244,11 @@ etc_sysctl_params:
value: 524288
state: present
home_users:
users:
flexo:
shell: /bin/zsh
dotfiles: git@git.spa5.dev:flexo/dotfiles
update: no
home_gnome_shell_extensions:
'https://github.com/ubuntu/gnome-shell-extension-appindicator':
extension_uuid: 'appindicatorsupport@rgcjonas.gmail.com'

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

@@ -2,3 +2,7 @@
- name: Include dotfiles.yml
ansible.builtin.include: dotfiles.yml
when: home_place_dotfiles | bool
- name: Include gnome.yml
ansible.builtin.include: gnome.yml
when: home_configure_gnome | bool