ansible/roles/sddm/tasks/main.yml

39 lines
1.1 KiB
YAML

#!/usr/bin/ansible-playbook
# vim:ft=ansible:
---
- name: Install and configure SDDM
block:
- name: Install SDDM
apt:
name:
- sddm
- name: Template out config
template:
src: main.conf
dest: /etc/sddm.conf.d/50-ansible.conf
mode: "0644"
- 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