Make tests for group membership more readable
This commit is contained in:
parent
8a25609749
commit
77f4643628
9 changed files with 24 additions and 24 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue