diff --git a/lmn-client.yml b/lmn-client.yml index 8e66529..037a403 100644 --- a/lmn-client.yml +++ b/lmn-client.yml @@ -132,7 +132,7 @@ cmd: unzip -d /tmp/cb/ CodeBlocks.zip && dpkg -i cb/*.deb chdir: /tmp/ when: codeblocks_version.stdout is not search('svn13456') - when: inventory_hostname in groups.PCroom + when: groups.PCroom is defined and inventory_hostname in groups.PCroom ## Temporarily fix boot order - name: Check for the buggy kernel diff --git a/roles/lmn_fvs/tasks/main.yml b/roles/lmn_fvs/tasks/main.yml index 27dfd80..1dcfcc6 100644 --- a/roles/lmn_fvs/tasks/main.yml +++ b/roles/lmn_fvs/tasks/main.yml @@ -136,7 +136,7 @@ command: /usr/local/sbin/bootorder.sh register: cmd_result changed_when: cmd_result.stdout is not search('Nothing to do.') - when: inventory_hostname in groups["PCroom"] + when: groups.PCroom is defined and inventory_hostname in groups.PCroom - name: Copy dolphin config scripts ansible.builtin.copy: diff --git a/roles/lmn_network/tasks/main.yml b/roles/lmn_network/tasks/main.yml index 022cc5f..0c7176a 100644 --- a/roles/lmn_network/tasks/main.yml +++ b/roles/lmn_network/tasks/main.yml @@ -26,4 +26,4 @@ deb http://deb.debian.org/debian/ {{ ansible_distribution_release }}-proposed-updates main non-free-firmware state: present - when: inventory_hostname in groups["R202"] + when: groups.R202 is defined and inventory_hostname in groups.R202