Merge "Don't fail hard when facter cache doesn't work correctly" into stable/queens

This commit is contained in:
Zuul 2019-11-26 05:23:52 +00:00 committed by Gerrit Code Review
commit 4428d1cceb
1 changed files with 9 additions and 0 deletions

View File

@ -335,14 +335,23 @@
state: absent state: absent
ignore_errors: True ignore_errors: True
- name: Pre-cache facts - name: Pre-cache facts
check_mode: false
command: facter --config /var/lib/container-puppet/puppetlabs/facter.conf command: facter --config /var/lib/container-puppet/puppetlabs/facter.conf
no_log: True no_log: True
ignore_errors: True ignore_errors: True
register: _facter_cache_run
- name: Facter error output when failed
check_mode: false
debug:
msg: "{{ _facter_cache_run.stderr }}"
when: _facter_cache_run is failed
- name: Sync cached facts - name: Sync cached facts
check_mode: false
synchronize: synchronize:
src: /opt/puppetlabs/ src: /opt/puppetlabs/
dest: /var/lib/container-puppet/puppetlabs/ dest: /var/lib/container-puppet/puppetlabs/
delegate_to: "{{ inventory_hostname }}" delegate_to: "{{ inventory_hostname }}"
when: _facter_cache_run is succeeded
###################################### ######################################
# Generate config via docker-puppet.py # Generate config via docker-puppet.py