ansible/roles/sddm/tasks/main.yml
2020-07-27 11:56:34 -05:00

40 lines
1.0 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
when: sddm_theme is defined
- name: Template out theme config
template:
src: theme.conf
dest: /etc/sddm.conf.d/51-ansible-theme.conf
mode: "0644"
when: sddm_theme_name is defined
become: yes