From 3f41f3f08ab3558eecaaaf97694f5b7268440809 Mon Sep 17 00:00:00 2001 From: Stonewall Jackson Date: Fri, 31 Mar 2023 20:34:42 -0400 Subject: linux_desktop: remove MATE, add qogir theme --- roles/linux_desktop/README.md | 21 ++++--- roles/linux_desktop/defaults/main.yml | 8 +++ roles/linux_desktop/handlers/main.yml | 5 ++ roles/linux_desktop/tasks/freeipa.yml | 10 +++ roles/linux_desktop/tasks/gdm.yml | 17 ++++++ roles/linux_desktop/tasks/lightdm.yml | 17 ++++++ roles/linux_desktop/tasks/main.yml | 15 ++--- roles/linux_desktop/tasks/theme.yml | 35 +++++++++++ .../etc/lightdm/lightdm-gtk-greeter.conf.j2 | 10 +++ roles/linux_desktop/vars/main.yml | 71 +++++++--------------- 10 files changed, 141 insertions(+), 68 deletions(-) create mode 100644 roles/linux_desktop/tasks/gdm.yml create mode 100644 roles/linux_desktop/tasks/lightdm.yml create mode 100644 roles/linux_desktop/tasks/theme.yml create mode 100644 roles/linux_desktop/templates/etc/lightdm/lightdm-gtk-greeter.conf.j2 (limited to 'roles/linux_desktop') diff --git a/roles/linux_desktop/README.md b/roles/linux_desktop/README.md index 338a885..21ab5e6 100644 --- a/roles/linux_desktop/README.md +++ b/roles/linux_desktop/README.md @@ -19,13 +19,18 @@ Variables This role **accepts** the following variables: -Variable | Default | Description --------------------------------------------|-----------------------------|------------ -`linux_desktop_access_group` | `role-linux-desktop-access` | FreeIPA group allowed to login to GDM (will be created) -`linux_desktop_flatpak_update_on_calendar` | `daily` | Systemd [calendar interval](https://www.freedesktop.org/software/systemd/man/systemd.time.html#Calendar%20Events) for updating Flatpak apps -`linux_desktop_enable_wayland` | yes | Enable Wayland compositor -`linux_desktop_thumbnail_cache_size` | 4096 | Size of thumbnail cache (MB) -`linux_desktop_enable_window_buttons` | yes | Enable minimize and maximize buttons +Variable | Default | Description +-------------------------------------------|-----------------------------------|------------ +`linux_desktop_access_group` | `role-linux-desktop-access` | FreeIPA group allowed to login to GDM (will be created) +`linux_desktop_flatpak_update_on_calendar` | `daily` | Systemd [calendar interval](https://www.freedesktop.org/software/systemd/man/systemd.time.html#Calendar%20Events) for updating Flatpak apps +`linux_desktop_enable_wayland` | yes | Enable Wayland compositor +`linux_desktop_thumbnail_cache_size` | 4096 | Size of thumbnail cache (MB) +`linux_desktop_display_manager` | `gdm` | Either `gdm` or `lightdm` +`linux_desktop_qogir_version` | see [defaults](defaults/main.yml) | [Qogir theme](https://github.com/vinceliuice/Qogir-theme) version +`linux_desktop_qogir_icon_version` | see [defaults](defaults/main.yml) | [Qogir icon theme](https://github.com/vinceliuice/Qogir-icon-theme) version +`linux_desktop_lightdm_gtk_theme` | `Qogir` | LightDM GTK theme name +`linux_desktop_lightdm_icon_theme` | `Qogir` | LightDM icon theme name +`linux_desktop_lightdm_cursor_theme` | `Qogir` | LightDM cursor theme name Usage ----- @@ -37,6 +42,4 @@ Example playbook: hosts: linux_desktops roles: - role: linux_desktop - vars: - linux_desktop_enable_window_buttons: yes ```` diff --git a/roles/linux_desktop/defaults/main.yml b/roles/linux_desktop/defaults/main.yml index c184ecc..a4f5a30 100644 --- a/roles/linux_desktop/defaults/main.yml +++ b/roles/linux_desktop/defaults/main.yml @@ -2,3 +2,11 @@ linux_desktop_access_group: role-linux-desktop-access linux_desktop_flatpak_update_on_calendar: daily linux_desktop_enable_wayland: yes linux_desktop_thumbnail_cache_size: 4096 # MB +linux_desktop_display_manager: gdm +linux_desktop_qogir_version: 2023-02-27 +linux_desktop_qogir_icon_version: 2023-02-23 + +linux_desktop_lightdm_background: /usr/share/backgrounds/rocky-default-9-onyx-mountains.png +linux_desktop_lightdm_gtk_theme: Qogir +linux_desktop_lightdm_icon_theme: Qogir +linux_desktop_lightdm_cursor_theme: Qogir diff --git a/roles/linux_desktop/handlers/main.yml b/roles/linux_desktop/handlers/main.yml index 16c1d21..633546f 100644 --- a/roles/linux_desktop/handlers/main.yml +++ b/roles/linux_desktop/handlers/main.yml @@ -3,5 +3,10 @@ name: gdm state: restarted +- name: restart lightdm + systemd: + name: lightdm + state: restarted + - name: update dconf command: dconf update diff --git a/roles/linux_desktop/tasks/freeipa.yml b/roles/linux_desktop/tasks/freeipa.yml index f7a09e1..be7761d 100644 --- a/roles/linux_desktop/tasks/freeipa.yml +++ b/roles/linux_desktop/tasks/freeipa.yml @@ -1,3 +1,12 @@ +- name: create lightdm HBAC service + ipahbacsvc: + ipaadmin_principal: '{{ ipa_user }}' + ipaadmin_password: '{{ ipa_pass }}' + name: lightdm + description: LightDM Display Manager + state: present + run_once: yes + - name: create linux-desktops hostgroup ipahostgroup: ipaadmin_principal: '{{ ipa_user }}' @@ -30,4 +39,5 @@ hbacsvc: - gdm - gdm-password + - lightdm run_once: yes diff --git a/roles/linux_desktop/tasks/gdm.yml b/roles/linux_desktop/tasks/gdm.yml new file mode 100644 index 0000000..124f415 --- /dev/null +++ b/roles/linux_desktop/tasks/gdm.yml @@ -0,0 +1,17 @@ +- name: generate gdm configuration + template: + src: etc/gdm/custom.conf.j2 + dest: /etc/gdm/custom.conf + notify: restart gdm + +- name: disable lightdm + systemd: + name: lightdm + enabled: no + state: stopped + +- name: enable gdm + systemd: + name: gdm + enabled: yes + state: started diff --git a/roles/linux_desktop/tasks/lightdm.yml b/roles/linux_desktop/tasks/lightdm.yml new file mode 100644 index 0000000..818aaec --- /dev/null +++ b/roles/linux_desktop/tasks/lightdm.yml @@ -0,0 +1,17 @@ +- name: configure lightdm greeter + template: + src: etc/lightdm/lightdm-gtk-greeter.conf.j2 + dest: /etc/lightdm/lightdm-gtk-greeter.conf + notify: restart lightdm + +- name: disable gdm + systemd: + name: gdm + enabled: no + state: stopped + +- name: enable lightdm + systemd: + name: lightdm + enabled: yes + state: started diff --git a/roles/linux_desktop/tasks/main.yml b/roles/linux_desktop/tasks/main.yml index 857815e..8666668 100644 --- a/roles/linux_desktop/tasks/main.yml +++ b/roles/linux_desktop/tasks/main.yml @@ -36,22 +36,14 @@ dest: /etc/systemd/system/default.target state: link -- name: generate gdm configuration - template: - src: etc/gdm/custom.conf.j2 - dest: /etc/gdm/custom.conf - notify: restart gdm - - name: check if graphical target is active command: systemctl is-active graphical.target register: graphical_target changed_when: false failed_when: false -- name: start display manager - command: systemctl isolate graphical.target - when: graphical_target.rc != 0 - notify: restart gdm +- name: configure display manager + include_tasks: '{{ linux_desktop_display_manager }}.yml' - name: enable fractional scaling copy: @@ -108,4 +100,7 @@ src: usr/local/share/thumbnailers/totem.thumbnailer dest: /usr/local/share/thumbnailers/totem.thumbnailer +- import_tasks: theme.yml + tags: theme + - import_tasks: freeipa.yml diff --git a/roles/linux_desktop/tasks/theme.yml b/roles/linux_desktop/tasks/theme.yml new file mode 100644 index 0000000..b497020 --- /dev/null +++ b/roles/linux_desktop/tasks/theme.yml @@ -0,0 +1,35 @@ +- name: create qogir source directories + file: + path: '{{ item }}' + state: directory + loop: + - '{{ linux_desktop_qogir_source_dir }}' + - '{{ linux_desktop_qogir_icon_source_dir }}' + +- name: extract qogir tarball + unarchive: + src: '{{ linux_desktop_qogir_url }}' + dest: '{{ linux_desktop_qogir_source_dir }}' + remote_src: yes + extra_opts: + - --strip-components=1 + register: linux_desktop_qogir_unarchive + +- name: install qogir theme + command: + cmd: ./install.sh -d /usr/share/themes -t default + chdir: '{{ linux_desktop_qogir_source_dir }}' + +- name: extract qogir icons tarball + unarchive: + src: '{{ linux_desktop_qogir_icon_url }}' + dest: '{{ linux_desktop_qogir_icon_source_dir }}' + remote_src: yes + extra_opts: + - --strip-components=1 + register: linux_desktop_qogir_icon_unarchive + +- name: install qogir icons + command: + cmd: ./install.sh -d /usr/share/icons -t default + chdir: '{{ linux_desktop_qogir_icon_source_dir }}' diff --git a/roles/linux_desktop/templates/etc/lightdm/lightdm-gtk-greeter.conf.j2 b/roles/linux_desktop/templates/etc/lightdm/lightdm-gtk-greeter.conf.j2 new file mode 100644 index 0000000..f0b5c99 --- /dev/null +++ b/roles/linux_desktop/templates/etc/lightdm/lightdm-gtk-greeter.conf.j2 @@ -0,0 +1,10 @@ +[greeter] +background = {{ linux_desktop_lightdm_background }} +theme-name = {{ linux_desktop_lightdm_gtk_theme }} +icon-theme-name = {{ linux_desktop_lightdm_icon_theme }} +cursor-theme-name = {{ linux_desktop_lightdm_cursor_theme }} +cursor-theme-size = 16 +font-name = Sans 9 +xft-rgba = rgb +xft-hintstyle = hintfull +hide-user-image = true diff --git a/roles/linux_desktop/vars/main.yml b/roles/linux_desktop/vars/main.yml index 06e27a9..f3d0a66 100644 --- a/roles/linux_desktop/vars/main.yml +++ b/roles/linux_desktop/vars/main.yml @@ -36,56 +36,26 @@ linux_desktop_packages: - exfatprogs - chromium - gnome-extensions-app - - papirus-icon-theme - audacious - # MATE - - adwaita-gtk2-theme - - atril - - atril-caja - - atril-thumbnailer - - caja caja-actions - - caja-image-converter - - caja-open-terminal - - caja-sendto - - caja-wallpaper - - caja-xattr-tags - - engrampa - - eom + # xfce + - '@Xfce' + - ristretto + - parole + - mousepad + - xfce4-weather-plugin + - xfce4-taskmanager + - xfce4-notifyd + - xfce4-screenshooter + - xfce4-whiskermenu-plugin + + # lightdm + - lightdm + - lightdm-gtk + + # qogir theme - gtk2-engines - - gucharmap - - libmatekbd - - libmatemixer - - libmateweather - - marco mate-applets - - mate-backgrounds - - mate-calc - - mate-control-center - - mate-desktop - - mate-dictionary - - mate-disk-usage-analyzer - - mate-icon-theme - - mate-media mate-menus - - mate-menus-preferences-category-menu - - mate-notification-daemon - - mate-panel - - mate-polkit - - mate-power-manager - - mate-screensaver - - mate-screenshot - - mate-search-tool - - mate-session-manager - - mate-settings-daemon - - mate-system-log - - mate-system-monitor - - mate-terminal - - mate-themes - - mate-user-admin - - mate-user-guide - - mozo - - network-manager-applet - - pluma - - seahorse-caja + - gtk-murrine-engine linux_desktop_excluded_packages: - gnome-software @@ -96,8 +66,6 @@ linux_desktop_hbac_hostgroup: linux_desktops linux_desktop_flathub_repos: - name: flathub url: https://dl.flathub.org/repo/flathub.flatpakrepo - - name: flathub-beta - url: https://flathub.org/beta-repo/flathub-beta.flatpakrepo linux_desktop_flatpaks: - org.signal.Signal @@ -114,3 +82,8 @@ linux_desktop_flatpaks: linux_desktop_flatpak_overrides: org.gnome.EasyTAG: --filesystem=host org.gnome.Rhythmbox3: --filesystem=host + +linux_desktop_qogir_url: https://github.com/vinceliuice/Qogir-theme/archive/refs/tags/{{ linux_desktop_qogir_version }}.tar.gz +linux_desktop_qogir_icon_url: https://github.com/vinceliuice/Qogir-icon-theme/archive/refs/tags/{{ linux_desktop_qogir_icon_version }}.tar.gz +linux_desktop_qogir_source_dir: /usr/local/src/qogir +linux_desktop_qogir_icon_source_dir: /usr/local/src/qogir-icons -- cgit