Add theme support to SDDM role

This commit is contained in:
Salt 2020-07-27 11:47:34 -05:00
parent b36fbed245
commit 764681ed7a
3 changed files with 29 additions and 5 deletions

View File

@ -41,4 +41,7 @@
3436643661633766616564663937346232353666386531363438
tags: [ desktop ]
- role: sddm
vars:
sddm_theme: "https://github.com/MarianArlt/sddm-chili/archive/0.1.5.zip"
sddm_theme_name: "sddm-chili-0.1.5"
tags: [ sddm, desktop ]

View File

@ -7,11 +7,32 @@
apt:
name:
- sddm
- name: Template out configs
- name: Template out config
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
src: main.conf
dest: /etc/sddm.conf.d/50-ansible.conf
mode: "0644"
loop:
- { src: "sddm.conf", dest: "/etc/sddm.conf.d/50-ansible.conf" }
- name: Install theme
block:
- name: Remove KDE config
file:
path: /etc/sddm.conf.d/kde_settings.conf
state: absent
- name: Download theme
get_url:
url: "{{ sddm_theme }}"
dest: "/usr/share/sddm/themes/ansible.zip"
register: t
- name: Unpack theme
unarchive:
src: "/usr/share/sddm/themes/ansible.zip"
dest: "/usr/share/sddm/themes"
remote_src: yes
when: t is changed
- name: Template out theme config
template:
src: theme.conf
dest: /etc/sddm.conf.d/51-ansible-theme.conf
mode: "0644"
when: sddm_theme is defined and sddm_theme_name is defined
become: yes