diff --git a/playbooks/fedora-workstation.yml b/playbooks/fedora-workstation.yml index f4580de..b2db1a6 100644 --- a/playbooks/fedora-workstation.yml +++ b/playbooks/fedora-workstation.yml @@ -79,18 +79,3 @@ - ansible-doc - ansible-collection-community-general - python3-psutil - - # Configure desktop environment. - - name: Install dconf keyfiles - copy: - src: ./files/dconf/ - dest: /etc/dconf/db/a-happy-gnome.d - - - name: Set 'user' dconf profile with the custom GNOME config - ansible.builtin.shell: echo "system-db:a-happy-gnome" >> /etc/dconf/profile/user - - - name: Enable night light in GNOME - dconf: - state: present - key: /org/gnome/settings-daemon/plugins/color/night-light-enabled - value: "true" diff --git a/files/dconf/desktop.conf b/roles/system/gnome/files/dconf/desktop.conf similarity index 100% rename from files/dconf/desktop.conf rename to roles/system/gnome/files/dconf/desktop.conf diff --git a/files/dconf/keybindings.conf b/roles/system/gnome/files/dconf/keybindings.conf similarity index 100% rename from files/dconf/keybindings.conf rename to roles/system/gnome/files/dconf/keybindings.conf diff --git a/roles/system/gnome/tasks/main.yml b/roles/system/gnome/tasks/main.yml new file mode 100644 index 0000000..72ef6a9 --- /dev/null +++ b/roles/system/gnome/tasks/main.yml @@ -0,0 +1,17 @@ +--- +- name: Install dconf keyfiles + copy: + src: "{{ role_path }}/files/dconf/" + dest: /etc/dconf/db/a-happy-gnome.d + +- name: Set 'user' dconf profile with the custom GNOME config + ansible.builtin.shell: grep "system-db:a-happy-gnome" && echo "system-db:a-happy-gnome" >> /etc/dconf/profile/user + +- name: Update dconf database + ansible.builtin.shell: dconf update + +- name: Enable night light in GNOME + dconf: + state: present + key: /org/gnome/settings-daemon/plugins/color/night-light-enabled + value: "true"