@@ -1,7 +1,7 @@ | |||||
display_manager_state: multiuser | display_manager_state: multiuser | ||||
display_manager_mainentance_text: Wartungsmodus – bitte nicht abschalten! | |||||
display_manager_mainentance_icon: preferences-system | |||||
display_manager_maintenance_text: Wartungsmodus – bitte nicht abschalten! | |||||
display_manager_maintenance_icon: preferences-system | |||||
display_manager_background_image: Hubble2005-01-barred-spiral-galaxy-NGC1300.jpg | display_manager_background_image: Hubble2005-01-barred-spiral-galaxy-NGC1300.jpg | ||||
# source: https://upload.wikimedia.org/wikipedia/commons/5/52/Hubble2005-01-barred-spiral-galaxy-NGC1300.jpg | # source: https://upload.wikimedia.org/wikipedia/commons/5/52/Hubble2005-01-barred-spiral-galaxy-NGC1300.jpg |
@@ -0,0 +1,17 @@ | |||||
--- | |||||
# to be removed when roled out | |||||
- name: remove wrong "mainentance" directory | |||||
file: | |||||
path: /usr/local/share/mainentance | |||||
state: absent | |||||
- name: remove wrong "mainentance" user | |||||
user: | |||||
name: mainentance | |||||
state: absent | |||||
- name: remove wrong "mainentance" user home directory | |||||
file: | |||||
path: /var/lib/mainentance | |||||
state: absent |
@@ -24,8 +24,8 @@ | |||||
- onboard | - onboard | ||||
notify: restart lightdm | notify: restart lightdm | ||||
- include: mainentance.yml | |||||
when: display_manager_state == 'mainentance' | |||||
- import_tasks: maintenance.yml | |||||
when: display_manager_state == 'maintenance' | |||||
- name: lightdm configuration | - name: lightdm configuration | ||||
template: | template: | ||||
@@ -64,3 +64,5 @@ | |||||
enabled: yes | enabled: yes | ||||
- meta: flush_handlers | - meta: flush_handlers | ||||
- import_tasks: cleanup-litter.yaml |
@@ -1,44 +0,0 @@ | |||||
--- | |||||
- name: install mainentance mode packages | |||||
apt: | |||||
pkg: "{{ item }}" | |||||
state: installed | |||||
with_items: | |||||
- yad | |||||
- xbindkeys | |||||
- feh | |||||
notify: restart lightdm | |||||
- name: mainentance user | |||||
user: | |||||
name: mainentance | |||||
system: yes | |||||
createhome: yes | |||||
home: /var/lib/mainentance | |||||
notify: restart lightdm | |||||
- name: mainentance directory | |||||
file: | |||||
path: /usr/local/share/mainentance | |||||
state: directory | |||||
notify: restart lightdm | |||||
- name: mainentance xsession desktop | |||||
template: | |||||
src: mainentance.desktop.j2 | |||||
dest: /usr/local/share/mainentance/mainentance.desktop | |||||
notify: restart lightdm | |||||
- name: mainentance xsession script | |||||
template: | |||||
src: mainentance-xsession.sh.j2 | |||||
dest: /usr/local/share/mainentance/xsession | |||||
mode: u=rwx,g=rx,o=rx | |||||
notify: restart lightdm | |||||
- name: mainentance xbindkeys | |||||
template: | |||||
src: mainentance.xbindkeys.j2 | |||||
dest: /usr/local/share/mainentance/xbindkeys | |||||
notify: restart lightdm |
@@ -0,0 +1,44 @@ | |||||
--- | |||||
- name: install maintenance mode packages | |||||
apt: | |||||
pkg: "{{ item }}" | |||||
state: installed | |||||
with_items: | |||||
- yad | |||||
- xbindkeys | |||||
- feh | |||||
notify: restart lightdm | |||||
- name: maintenance user | |||||
user: | |||||
name: maintenance | |||||
system: yes | |||||
createhome: yes | |||||
home: /var/lib/maintenance | |||||
notify: restart lightdm | |||||
- name: maintenance directory | |||||
file: | |||||
path: /usr/local/share/maintenance | |||||
state: directory | |||||
notify: restart lightdm | |||||
- name: maintenance xsession desktop | |||||
template: | |||||
src: maintenance.desktop.j2 | |||||
dest: /usr/local/share/maintenance/maintenance.desktop | |||||
notify: restart lightdm | |||||
- name: maintenance xsession script | |||||
template: | |||||
src: maintenance-xsession.sh.j2 | |||||
dest: /usr/local/share/maintenance/xsession | |||||
mode: u=rwx,g=rx,o=rx | |||||
notify: restart lightdm | |||||
- name: maintenance xbindkeys | |||||
template: | |||||
src: maintenance.xbindkeys.j2 | |||||
dest: /usr/local/share/maintenance/xbindkeys | |||||
notify: restart lightdm |
@@ -20,8 +20,8 @@ | |||||
# backup-logs = True to move add a .old suffix to old log files when opening new ones | # backup-logs = True to move add a .old suffix to old log files when opening new ones | ||||
# | # | ||||
[LightDM] | [LightDM] | ||||
{% if display_manager_state == "mainentance" %} | |||||
sessions-directory=/usr/local/share/mainentance | |||||
{% if display_manager_state == "maintenance" %} | |||||
sessions-directory=/usr/local/share/maintenance | |||||
{% endif %} | {% endif %} | ||||
# | # | ||||
@@ -76,10 +76,10 @@ sessions-directory=/usr/local/share/mainentance | |||||
[Seat:*] | [Seat:*] | ||||
greeter-session=lightdm-gtk-greeter | greeter-session=lightdm-gtk-greeter | ||||
{% if display_manager_state == "mainentance" %} | |||||
autologin-user=mainentance | |||||
{% if display_manager_state == "maintenance" %} | |||||
autologin-user=maintenance | |||||
autologin-user-timeout=0 | autologin-user-timeout=0 | ||||
user-session=mainentance | |||||
user-session=maintenance | |||||
{% endif %} | {% endif %} | ||||
{% if display_setup_commands is defined %} | {% if display_setup_commands is defined %} | ||||
@@ -1,8 +0,0 @@ | |||||
[Desktop Entry] | |||||
Name=mainentance | |||||
Comment=mainentance xsession | |||||
Exec=/usr/local/share/mainentance/xsession | |||||
Type=Application | |||||
X-LightDM-DesktopName=mainentance | |||||
DesktopNames=mainentance | |||||
Keywords=wm;windowmanager;window;manager; |
@@ -3,5 +3,5 @@ | |||||
xset -dpms | xset -dpms | ||||
xset s off | xset s off | ||||
feh --bg-scale "{{display_manager_background_image_path}}" | feh --bg-scale "{{display_manager_background_image_path}}" | ||||
xbindkeys -f /usr/local/share/mainentance/xbindkeys & | |||||
exec yad --no-buttons --no-escape --image-on-top --center --borders 50 --image="{{display_manager_mainentance_icon}}" --text="{{display_manager_mainentance_text}}" | |||||
xbindkeys -f /usr/local/share/maintenance/xbindkeys & | |||||
exec yad --no-buttons --no-escape --image-on-top --center --borders 50 --image="{{display_manager_maintenance_icon}}" --text="{{display_manager_maintenance_text}}" |
@@ -0,0 +1,8 @@ | |||||
[Desktop Entry] | |||||
Name=maintenance | |||||
Comment=maintenance xsession | |||||
Exec=/usr/local/share/maintenance/xsession | |||||
Type=Application | |||||
X-LightDM-DesktopName=maintenance | |||||
DesktopNames=maintenance | |||||
Keywords=wm;windowmanager;window;manager; |