Browse Source

Revert "Add facter cache for container configurations"

This reverts commit 4ec57c60f3.

There are some perm issues with the config generation. Let's
revert this and address those.

Related-Bug: #1837082
Change-Id: Ia806fba30724f18a21153557472e9fb493939ced
changes/22/671522/3
Alex Schultz 2 years ago
parent
commit
1565c50be6
  1. 3
      common/container-puppet.py
  2. 54
      common/deploy-steps-tasks.yaml

3
common/container-puppet.py

@ -436,9 +436,6 @@ def mp_puppet_config(*args):
'--volume', '/etc/pki/tls/certs/ca-bundle.trust.crt:/etc/pki/tls/certs/ca-bundle.trust.crt:ro',
'--volume', '/etc/pki/tls/cert.pem:/etc/pki/tls/cert.pem:ro',
'--volume', '%s:/var/lib/config-data/:rw' % config_volume_prefix,
# facter caching
'--volume', '/var/lib/container-puppet/puppetlabs/facter.conf:/etc/puppetlabs/facter/facter.conf:ro',
'--volume', '/var/lib/container-puppet/puppetlabs/:/opt/puppetlabs/:ro',
# Syslog socket for puppet logs
'--volume', '/dev/log:/dev/log:rw']
if privileged:

54
common/deploy-steps-tasks.yaml

@ -421,60 +421,6 @@
- host_config
ignore_errors: "{{ ansible_check_mode|bool }}"
#########################################
# Pre-cache facts for container-puppet.py
#########################################
- name: Create puppet caching structures
file:
path: /var/lib/container-puppet/puppetlabs
state: directory
setype: svirt_sandbox_file_t
selevel: s0
recurse: True
tags:
- container_config
- container_config_tasks
- name: Write facter cache config
copy:
dest: /var/lib/container-puppet/puppetlabs/facter.conf
content: |
facts : {
ttls: [
{ "kernel" : 8 hour },
{ "memory" : 8 hour },
{ "networking" : 8 hour },
{ "operating system" : 8 hour },
{ "processor" : 8 hour },
]
}
tags:
- container_config
- container_config_tasks
- name: Cleanup facter cache if exists
file:
path: /opt/puppetlabs/facter
state: absent
ignore_errors: True
tags:
- container_config
- container_config_tasks
- name: Pre-cache facts
command: facter --config /var/lib/container-puppet/puppetlabs/facter.conf
no_log: True
ignore_errors: True
tags:
- container_config
- container_config_tasks
- name: Sync cached facts
synchronize:
src: /opt/puppetlabs/
dest: /var/lib/container-puppet/puppetlabs/
delegate_to: "{{ inventory_hostname }}"
tags:
- container_config
- container_config_tasks
######################################
# Generate config via container-puppet.py
######################################

Loading…
Cancel
Save