Merge "Improve facter cache reliability" into stable/stein

This commit is contained in:
Zuul 2020-06-05 10:50:19 +00:00 committed by Gerrit Code Review
commit 2e309805be
1 changed files with 5 additions and 2 deletions

View File

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