Skip to content

Commit

Permalink
Externalize answer defaults
Browse files Browse the repository at this point in the history
This moves all non-default options into the Hiera layer. Since Kafo 3.0
this works and is supported. It also means --reset-$option loads the
installer default rather than the Puppet default.
  • Loading branch information
ekohl committed Aug 25, 2021
1 parent e99d6c4 commit ac88602
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 58 deletions.
6 changes: 1 addition & 5 deletions config/foreman-answers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,4 @@ foreman_proxy::plugin::openscap: false
foreman_proxy::plugin::remote_execution::ssh: false
foreman_proxy::plugin::salt: false
foreman_proxy::plugin::shellhooks: false
puppet:
server: true
server_jvm_extra_args:
- "-Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"
- "-XX:ReservedCodeCacheSize=512m"
puppet: {}
1 change: 1 addition & 0 deletions config/foreman-hiera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ hierarchy:
- name: "Built in"
paths:
- "scenario/%{facts.kafo.scenario.id}/family/%{facts.os.family}-%{facts.os.release.major}.yaml"
- "scenario/%{facts.kafo.scenario.id}/defaults.yaml"
- "family/%{facts.os.family}-%{facts.os.release.major}.yaml"
- "family/%{facts.os.family}.yaml"
- "security.yaml"
Expand Down
27 changes: 4 additions & 23 deletions config/foreman-proxy-content-answers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,9 @@
#
# See params.pp in each class for what options are available
---
certs:
generate: false
foreman_proxy_content:
pulpcore_mirror: true
foreman_proxy:
foreman_ssl_ca: /etc/foreman-proxy/foreman_ssl_ca.pem
foreman_ssl_cert: /etc/foreman-proxy/foreman_ssl_cert.pem
foreman_ssl_key: /etc/foreman-proxy/foreman_ssl_key.pem
http: true
manage_puppet_group: false
ssl_ca: /etc/foreman-proxy/ssl_ca.pem
ssl_cert: /etc/foreman-proxy/ssl_cert.pem
ssl_key: /etc/foreman-proxy/ssl_key.pem
ssl_port: '9090'
templates: true
certs: {}
foreman_proxy_content: {}
foreman_proxy: {}
foreman_proxy::plugin::acd: false
foreman_proxy::plugin::ansible: false
foreman_proxy::plugin::dhcp::infoblox: false
Expand All @@ -33,11 +21,4 @@ foreman_proxy::plugin::dns::infoblox: false
foreman_proxy::plugin::openscap: false
foreman_proxy::plugin::remote_execution::ssh: false
foreman_proxy::plugin::shellhooks: false
puppet:
server: true
server_foreman_ssl_ca: /etc/pki/katello/puppet/puppet_client_ca.crt
server_foreman_ssl_cert: /etc/pki/katello/puppet/puppet_client.crt
server_foreman_ssl_key: /etc/pki/katello/puppet/puppet_client.key
server_jvm_extra_args:
- "-Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"
- "-XX:ReservedCodeCacheSize=512m"
puppet: {}
5 changes: 5 additions & 0 deletions config/foreman.hiera/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ katello::globals::enable_file: "%{alias('foreman_proxy_content::enable_file')}"
katello::globals::enable_docker: "%{alias('foreman_proxy_content::enable_docker')}"
katello::globals::enable_deb: "%{alias('foreman_proxy_content::enable_deb')}"
katello::globals::enable_ansible_collection: "%{alias('foreman_proxy_content::enable_ansible')}"

puppet::server: true
puppet::server_jvm_extra_args:
- "-Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"
- "-XX:ReservedCodeCacheSize=512m"
18 changes: 18 additions & 0 deletions config/foreman.hiera/scenario/foreman-proxy-content/defaults.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
certs::generate: false

foreman_proxy_content::pulpcore_mirror: true

foreman_proxy::foreman_ssl_ca: /etc/foreman-proxy/foreman_ssl_ca.pem
foreman_proxy::foreman_ssl_cert: /etc/foreman-proxy/foreman_ssl_cert.pem
foreman_proxy::foreman_ssl_key: /etc/foreman-proxy/foreman_ssl_key.pem
foreman_proxy::http: true
foreman_proxy::manage_puppet_group: false
foreman_proxy::ssl_ca: /etc/foreman-proxy/ssl_ca.pem
foreman_proxy::ssl_cert: /etc/foreman-proxy/ssl_cert.pem
foreman_proxy::ssl_key: /etc/foreman-proxy/ssl_key.pem
foreman_proxy::ssl_port: 9090
foreman_proxy::templates: true

puppet::server_foreman_ssl_ca: /etc/pki/katello/puppet/puppet_client_ca.crt
puppet::server_foreman_ssl_cert: /etc/pki/katello/puppet/puppet_client.crt
puppet::server_foreman_ssl_key: /etc/pki/katello/puppet/puppet_client.key
25 changes: 25 additions & 0 deletions config/foreman.hiera/scenario/katello/defaults.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
certs::group: foreman

foreman::client_ssl_ca: /etc/foreman/proxy_ca.pem
foreman::client_ssl_cert: /etc/foreman/client_cert.pem
foreman::client_ssl_key: /etc/foreman/client_key.pem
foreman::initial_location: Default Location
foreman::initial_organization: Default Organization
foreman::server_ssl_ca: /etc/pki/katello/certs/katello-default-ca.crt
foreman::server_ssl_cert: /etc/pki/katello/certs/katello-apache.crt
foreman::server_ssl_chain: /etc/pki/katello/certs/katello-server-ca.crt
foreman::server_ssl_crl: ""
foreman::server_ssl_key: /etc/pki/katello/private/katello-apache.key

foreman_proxy::foreman_ssl_ca: /etc/foreman-proxy/foreman_ssl_ca.pem
foreman_proxy::foreman_ssl_cert: /etc/foreman-proxy/foreman_ssl_cert.pem
foreman_proxy::foreman_ssl_key: /etc/foreman-proxy/foreman_ssl_key.pem
foreman_proxy::manage_puppet_group: false
foreman_proxy::ssl_ca: /etc/foreman-proxy/ssl_ca.pem
foreman_proxy::ssl_cert: /etc/foreman-proxy/ssl_cert.pem
foreman_proxy::ssl_key: /etc/foreman-proxy/ssl_key.pem
foreman_proxy::ssl_port: 9090

puppet::server_foreman_ssl_ca: /etc/pki/katello/puppet/puppet_client_ca.crt
puppet::server_foreman_ssl_cert: /etc/pki/katello/puppet/puppet_client.crt
puppet::server_foreman_ssl_key: /etc/pki/katello/puppet/puppet_client.key
34 changes: 4 additions & 30 deletions config/katello-answers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,8 @@
#
# See params.pp in each class for what options are available
---
certs:
group: foreman
foreman:
client_ssl_ca: /etc/foreman/proxy_ca.pem
client_ssl_cert: /etc/foreman/client_cert.pem
client_ssl_key: /etc/foreman/client_key.pem
initial_location: Default Location
initial_organization: Default Organization
server_ssl_ca: /etc/pki/katello/certs/katello-default-ca.crt
server_ssl_cert: /etc/pki/katello/certs/katello-apache.crt
server_ssl_chain: /etc/pki/katello/certs/katello-server-ca.crt
server_ssl_crl: ""
server_ssl_key: /etc/pki/katello/private/katello-apache.key
certs: {}
foreman: {}
foreman::cli: true
foreman::cli::ansible: false
foreman::cli::azure: false
Expand Down Expand Up @@ -69,15 +58,7 @@ foreman::plugin::tasks: true
foreman::plugin::templates: false
foreman::plugin::virt_who_configure: false
foreman::plugin::webhooks: false
foreman_proxy:
foreman_ssl_ca: /etc/foreman-proxy/foreman_ssl_ca.pem
foreman_ssl_cert: /etc/foreman-proxy/foreman_ssl_cert.pem
foreman_ssl_key: /etc/foreman-proxy/foreman_ssl_key.pem
manage_puppet_group: false
ssl_ca: /etc/foreman-proxy/ssl_ca.pem
ssl_cert: /etc/foreman-proxy/ssl_cert.pem
ssl_key: /etc/foreman-proxy/ssl_key.pem
ssl_port: '9090'
foreman_proxy: {}
foreman_proxy::plugin::acd: false
foreman_proxy::plugin::ansible: false
foreman_proxy::plugin::chef: false
Expand All @@ -92,11 +73,4 @@ foreman_proxy::plugin::salt: false
foreman_proxy::plugin::shellhooks: false
foreman_proxy_content: {}
katello: {}
puppet:
server: true
server_foreman_ssl_ca: /etc/pki/katello/puppet/puppet_client_ca.crt
server_foreman_ssl_cert: /etc/pki/katello/puppet/puppet_client.crt
server_foreman_ssl_key: /etc/pki/katello/puppet/puppet_client.key
server_jvm_extra_args:
- "-Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger"
- "-XX:ReservedCodeCacheSize=512m"
puppet: {}

0 comments on commit ac88602

Please sign in to comment.