As per Ansible 2.3 it's possible to use seed from the inventory hostname.
This turns 'random' numbers idempotent
This commit is contained in:
parent
cf7a8a14b1
commit
d40496225b
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
borgbackup_required: True
|
borgbackup_required: true
|
||||||
|
|
||||||
borgbackup_client_user: root
|
borgbackup_client_user: root
|
||||||
borgbackup_ssh_key: "~{{ borgbackup_client_user }}/.ssh/id_borg_rsa"
|
borgbackup_ssh_key: "~{{ borgbackup_client_user }}/.ssh/id_borg_rsa"
|
||||||
@ -33,11 +33,11 @@ borgbackup_retention:
|
|||||||
yearly: 1
|
yearly: 1
|
||||||
|
|
||||||
borgbackup_cron_day: "*"
|
borgbackup_cron_day: "*"
|
||||||
borgbackup_cron_hour: "{{ 5|random }}"
|
borgbackup_cron_hour: "{{ 5|random(seed=inventory_hostname) }}"
|
||||||
borgbackup_cron_minute: "{{ 59|random }}"
|
borgbackup_cron_minute: "{{ 59|random(seed=inventory_hostname) }}"
|
||||||
|
|
||||||
borgbackup_appendonly: False
|
borgbackup_appendonly: false
|
||||||
borgbackup_appendonly_repoconfig: False
|
borgbackup_appendonly_repoconfig: false
|
||||||
borgbackup_management_station: ''
|
borgbackup_management_station: ''
|
||||||
borgbackup_management_user: ''
|
borgbackup_management_user: ''
|
||||||
borgbackup_management_ssh_pubkey: ''
|
borgbackup_management_ssh_pubkey: ''
|
||||||
|
Loading…
Reference in New Issue
Block a user