diff --git a/common/deploy-steps-tasks.yaml b/common/deploy-steps-tasks.yaml index f07b9c9576..7386776299 100644 --- a/common/deploy-steps-tasks.yaml +++ b/common/deploy-steps-tasks.yaml @@ -314,6 +314,22 @@ setype: svirt_sandbox_file_t selevel: s0 recurse: True + - name: Check for facter.conf + check_mode: false + stat: + path: "/var/lib/container-puppet/puppetlabs/facter.conf" + register: _facter_conf_file + # See LP#1852606 for context + - name: Remove facter.conf if directory + check_mode: false + become: true + file: + path: "/var/lib/container-puppet/puppetlabs/facter.conf" + state: absent + force: true + when: + - _facter_conf_file.stat.isdir is defined + - _facter_conf_file.stat.isdir - name: Write facter cache config copy: dest: /var/lib/container-puppet/puppetlabs/facter.conf