Actions
Bug #14568
closedDefault answers for undef parameters stored as ::module::params::param on Puppet 4
Description
When Kafo determines default values for class parameters, any parameter that evaluates to undef is stored in the answers file as the parameter name when running under Puppet 4:
--- foreman: foreman_url: https://foreman.example.com selinux: '::foreman::params::selinux' locations_enabled: false organizations_enabled: false passenger_interface: '::foreman::params::passenger_interface' email_conf: email.yaml email_source: email.yaml.erb email_delivery_method: '::foreman::params::email_delivery_method' email_smtp_address: '::foreman::params::email_smtp_address' email_smtp_port: 25 email_smtp_domain: '::foreman::params::email_smtp_domain' email_smtp_authentication: none email_smtp_user_name: '::foreman::params::email_smtp_user_name' email_smtp_password: '::foreman::params::email_smtp_password'
When Puppet runs, it fails with:
[ERROR 2016-04-08 21:38:26 main] Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, email_delivery_method can be either sendmail or smtp, not ::foreman::params::email_delivery_method at /usr/share/foreman-installer/modules/foreman/manifests/init.pp:320:5 on node foreman.example.com
On Puppet 3, the answers file has the same parameter stored as nil:
--- foreman: email_conf: email.yaml email_source: email.yaml.erb email_delivery_method: email_smtp_address: email_smtp_port: 25 email_smtp_domain: email_smtp_authentication: none email_smtp_user_name: email_smtp_password:
Actions