Merge "Improve facter cache reliability" into stable/train

This commit is contained in:
Zuul 2020-06-12 10:22:36 +00:00 committed by Gerrit Code Review
commit 739ee00e75
1 changed files with 5 additions and 2 deletions

View File

@ -98,6 +98,7 @@
dest: /var/lib/container-puppet/puppetlabs/facter.conf
content: |
facts : {
blocklist: [ "EC2" ],
ttls: [
{ "kernel" : 8 hour },
{ "memory" : 8 hour },
@ -116,12 +117,14 @@
- name: Pre-cache facts
check_mode: false
command: facter --config /var/lib/container-puppet/puppetlabs/facter.conf
retries: 5
delay: 5
no_log: True
ignore_errors: True
register: _facter_cache_run
- name: Facter error output when failed
- name: Failed deployment if facter fails
check_mode: false
debug:
fail:
msg: "{{ _facter_cache_run.stderr }}"
when: _facter_cache_run is failed
- name: Sync cached facts