44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
#!/usr/bin/ansible-playbook
|
|
# vim:ft=ansible:
|
|
---
|
|
- name: Install and configure SDDM
|
|
block:
|
|
- name: Install SDDM
|
|
apt:
|
|
name:
|
|
- sddm
|
|
- name: Create config directory
|
|
file:
|
|
path: /etc/sddm.conf.d
|
|
state: directory
|
|
- 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
|