Exclude disabled group from backup-server loop

We don't set bup_user for hosts in disabled in the backup role
if they are in the disabled group, so they are not available to
be used in backup-server. We need to also exclude them here.

Change-Id: Ib5fd249533d5d8de0179bf16d61cf88f4c11f301
This commit is contained in:
Monty Taylor 2020-04-11 14:53:20 -05:00
parent 95184b5454
commit ba8c84a5ca

View File

@ -12,7 +12,7 @@
- name: Build all bup users from backup hosts - name: Build all bup users from backup hosts
set_fact: set_fact:
bup_users: '{{ bup_users }} + [ {{ hostvars[item]["bup_user"] }} ]' bup_users: '{{ bup_users }} + [ {{ hostvars[item]["bup_user"] }} ]'
with_inventory_hostnames: backup with_inventory_hostnames: 'backup:!disabled'
- name: Create bup users - name: Create bup users
include_tasks: user.yaml include_tasks: user.yaml