Teacherlaptops don't need pwroff service and suspend function will not be disabled.

This commit is contained in:
Raphael Dannecker 2024-04-29 18:53:22 +02:00
parent 30749ac24b
commit da88db0061
2 changed files with 5 additions and 0 deletions

View file

@ -139,6 +139,7 @@
- pwroff.timer - pwroff.timer
- reporter.service - reporter.service
- reporter.timer - reporter.timer
when: not (groups.teacherlaptop is defined and inventory_hostname in groups.teacherlaptop)
- name: Enable pwroff.timer - name: Enable pwroff.timer
systemd: systemd:
@ -147,6 +148,7 @@
loop: loop:
- pwroff.timer - pwroff.timer
- reporter.timer - reporter.timer
when: not (groups.teacherlaptop is defined and inventory_hostname in groups.teacherlaptop)
- name: PXE first boot order - name: PXE first boot order
command: /usr/local/sbin/bootorder.sh command: /usr/local/sbin/bootorder.sh
@ -196,6 +198,7 @@
[AC][SuspendSession][$i] [AC][SuspendSession][$i]
idleTime=7200000 idleTime=7200000
suspendType=8 suspendType=8
when: not (groups.teacherlaptop is defined and inventory_hostname in groups.teacherlaptop)
- name: Start with empty session by default - name: Start with empty session by default
ansible.builtin.copy: ansible.builtin.copy:

View file

@ -104,6 +104,7 @@
path: /etc/systemd/sleep.conf.d/ path: /etc/systemd/sleep.conf.d/
state: directory state: directory
mode: '0755' mode: '0755'
when: not (groups.teacherlaptop is defined and inventory_hostname in groups.teacherlaptop)
- name: Avoid suspending - name: Avoid suspending
blockinfile: blockinfile:
@ -115,6 +116,7 @@
AllowHibernation=no AllowHibernation=no
AllowSuspendThenHibernate=no AllowSuspendThenHibernate=no
AllowHybridSleep=no AllowHybridSleep=no
when: not (groups.teacherlaptop is defined and inventory_hostname in groups.teacherlaptop)
- name: Deploy dolphin script - name: Deploy dolphin script
copy: copy: