Added role boot to configure GRUB / Plymouth

master
Felix Stupp 4 years ago
parent 9e753299b2
commit 65e59c65a2
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -14,4 +14,6 @@ ansible_user: "{{ admin_user }}"
ansible_become: yes
ansible_become_pass: "{{ admin_pass }}"
global_plymouth_themes_directory: "/usr/share/plymouth/themes"
LOCAL_SALT: "o8hAvjdHzUxN9mKqc2mAyQUs838jb9ZVL55gsZe459bsoKw66YrH7mWMMhcyDC7t8ZdAhbucVgsM3vkb"

@ -0,0 +1,7 @@
---
# system_name: "Example System"
plymouth_theme_pack: internal # internal does prevent download
plymouth_theme: spinner
plymouth_theme_url: "https://github.com/adi1090x/files/raw/master/plymouth-themes/themes/{{ plymouth_theme_pack }}/{{ plymouth_theme }}.tar.gz"

@ -0,0 +1,7 @@
---
- name: update-grub
command: /usr/sbin/update-grub
- name: rebuild initrd
command: /usr/sbin/update-initramfs -u

@ -0,0 +1,3 @@
---
allow_duplicates: no

@ -0,0 +1,39 @@
---
- name: Install required packages
apt:
state: present
name:
- plymouth # Bootup Splash
- plymouth-themes # Bootup Splash Theme
- name: Configure GRUB
template:
src: default_grub.txt
dest: /etc/default/grub
owner: root
group: root
mode: u=rw,g=r,o=r
notify:
- update-grub
- name: Download plymouth theme
unarchive:
src: "{{ plymouth_theme_url }}"
dest: "{{ global_plymouth_themes_directory }}"
remote_src: yes
owner: root
group: root
mode: u=rwX,g=rX,o=rX
creates: "{{ global_plymouth_themes_directory }}/{{ plymouth_theme }}"
when: plymouth_theme_pack != 'internal'
- name: Configure Plymouth
template:
src: plymouthd.conf
dest: /etc/plymouth/plymouthd.conf
owner: root
group: root
mode: u=rw,g=r,o=r
notify:
- rebuild initrd

@ -3,7 +3,7 @@
GRUB_DEFAULT=0
GRUB_TIMEOUT=0
GRUB_TIMEOUT_STYLE="hidden"
GRUB_DISTRIBUTOR="ImageViewer (`lsb_release -i -s 2> /dev/null || echo Debian`)"
GRUB_DISTRIBUTOR="{{ system_name }} (`lsb_release -i -s 2> /dev/null || echo Debian`)"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash loglevel=0 rd.systemd.show_status=quiet rd.udev.log-priority=3 vt.global_cursor_default=0"
GRUB_CMDLINE_LINUX=""

@ -0,0 +1,2 @@
[Daemon]
Theme={{ plymouth_theme }}

@ -13,11 +13,9 @@
- name: Configure ImageViewer
hosts: all
handlers:
- name: update-grub
command: /usr/sbin/update-grub
- name: rebuild initrd
command: /usr/sbin/update-initramfs -u
roles:
- role: boot
system_name: ImageViewer
tasks:
- name: Update and upgrade packages
apt:
@ -43,8 +41,6 @@
- gvfs-fuse # For automatic mount by pcmanfm
- network-manager # For using wifi connections (for auto update)
# Frontend dependencies
- plymouth # Bootup Splash
- plymouth-themes # Bootup Splash Theme
- lightdm # Desktop Manager, autologin and relogin to admin account
- lightdm-gtk-greeter # Greeter for Desktop Manager
- xorg # XServer
@ -78,24 +74,6 @@
state: enabled
policy: deny
direction: incoming
- name: Configure GRUB
template:
src: global/default_grub.txt
dest: /etc/default/grub
owner: root
group: root
mode: u=rw,g=r,o=r
notify:
- update-grub
- name: Configure Plymouth
template:
src: global/plymouthd.conf
dest: /etc/plymouth/plymouthd.conf
owner: root
group: root
mode: u=rw,g=r,o=r
notify:
- rebuild initrd
- name: Configure SystemD LoginD
lineinfile:
path: /etc/systemd/logind.conf

@ -1,2 +0,0 @@
[Daemon]
Theme=spinner
Loading…
Cancel
Save