Make tests for group membership more readable

This commit is contained in:
Andreas B. Mundt 2024-11-21 11:20:26 +01:00
parent 8a25609749
commit 77f4643628
9 changed files with 24 additions and 24 deletions

View file

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