
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
22 lines
453 B
YAML
22 lines
453 B
YAML
- name: Create backup directory
|
|
file:
|
|
state: directory
|
|
path: /opt/backups
|
|
|
|
- name: Install bup
|
|
package:
|
|
name:
|
|
- bup
|
|
state: present
|
|
|
|
- name: Build all bup users from backup hosts
|
|
set_fact:
|
|
bup_users: '{{ bup_users }} + [ {{ hostvars[item]["bup_user"] }} ]'
|
|
with_inventory_hostnames: 'backup:!disabled'
|
|
|
|
- name: Create bup users
|
|
include_tasks: user.yaml
|
|
loop: '{{ bup_users }}'
|
|
loop_control:
|
|
loop_var: bup_user
|