From 2107a25399b40eb5422596d2abd866834ee73007 Mon Sep 17 00:00:00 2001 From: Petri Lammi Date: Wed, 19 Sep 2018 17:03:16 +0300 Subject: [PATCH] Add default parameters. Foreman was lacking default parameters, resulting to undefs and failing. This commit adds default parameters to the class. URL: https://github.com/Puppet-Finland/puppet-puppetmaster/issues/31 Signed-off-by: Petri Lammi --- manifests/lcm.pp | 126 +++++++++++++++++++++++------------------------ 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/manifests/lcm.pp b/manifests/lcm.pp index 1d78cca..6efa193 100644 --- a/manifests/lcm.pp +++ b/manifests/lcm.pp @@ -155,69 +155,69 @@ String $foreman_admin_password, String $puppetdb_database_password, Array[String] $primary_names, - Boolean $foreman_plugin_cockpit, - Boolean $foreman_compute_vmware, - Boolean $foreman_compute_libvirt, - Boolean $foreman_compute_ec2, - Boolean $foreman_compute_gce, - Boolean $foreman_compute_openstack, - Boolean $foreman_compute_ovirt, - Boolean $foreman_compute_rackspace, - Boolean $foreman_plugin_azure, - Boolean $foreman_plugin_ansible, - Boolean $foreman_plugin_docker, - Boolean $foreman_plugin_bootdisk, - Boolean $foreman_plugin_default_hostgroup, - Boolean $foreman_plugin_dhcp_browser, - Boolean $foreman_plugin_digitalocean, - Boolean $foreman_plugin_discovery, - Boolean $foreman_plugin_hooks, - Boolean $foreman_plugin_memcache, - Boolean $foreman_plugin_remote_execution, - Boolean $foreman_plugin_tasks, - Boolean $foreman_plugin_templates, - String $foreman_proxy_foreman_base_url, - Boolean $foreman_proxy_templates, - String $foreman_proxy_templates_listen_on, - Array[String] $foreman_proxy_trusted_hosts, - Boolean $foreman_proxy_dhcp, - String $foreman_proxy_dhcp_listen_on, - Boolean $foreman_proxy_dns, - Boolean $foreman_proxy_dhcp_managed, - String $foreman_proxy_dhcp_interface, - Array[String] $foreman_proxy_dhcp_option_domain, - Array[String] $foreman_proxy_dhcp_search_domains, - String $foreman_proxy_dhcp_server, - String $foreman_proxy_dhcp_provider, - Array[String] $foreman_proxy_dhcp_subnets, - String $foreman_proxy_dhcp_gateway, - String $foreman_proxy_dhcp_range, - String $foreman_proxy_dhcp_nameservers, - String $foreman_proxy_dhcp_pxeserver, - Boolean $foreman_proxy_dns_managed, - Array[String] $foreman_proxy_dns_forwarders, - String $foreman_proxy_dns_interface, - String $foreman_proxy_dns_listen_on, - String $foreman_proxy_dns_provider, - String $foreman_proxy_dns_zone, - String $foreman_proxy_dns_reverse, - String $foreman_proxy_dns_server, - Integer $foreman_proxy_dns_ttl, - Boolean $foreman_proxy_tftp, - Boolean $foreman_proxy_tftp_managed, - String $foreman_proxy_tftp_servername, - Boolean $foreman_proxy_tftp_manage_wget, - String $foreman_proxy_tftp_listen_on, - Boolean $foreman_proxy_bmc, - String $foreman_proxy_bmc_listen_on, - Array[String] $foreman_proxy2_hostnames, - String $foreman_proxy2_ipaddress, - Array[String] $foreman_proxy3_hostnames, - String $foreman_proxy3_ipaddress, - Array[String] $foreman_proxy4_hostnames, - String $foreman_proxy4_ipaddress, + Boolean $foreman_plugin_cockpit = false, + Boolean $foreman_compute_vmware = false, + Boolean $foreman_compute_libvirt = false, + Boolean $foreman_compute_ec2 = false, + Boolean $foreman_compute_gce = false, + Boolean $foreman_compute_openstack = false, + Boolean $foreman_compute_ovirt = false, + Boolean $foreman_compute_rackspace = false, + Boolean $foreman_plugin_azure = false, + Boolean $foreman_plugin_ansible = false, + Boolean $foreman_plugin_docker = false, + Boolean $foreman_plugin_bootdisk = false, + Boolean $foreman_plugin_default_hostgroup = false, + Boolean $foreman_plugin_dhcp_browser = false, + Boolean $foreman_plugin_digitalocean = false, + Boolean $foreman_plugin_discovery = false, + Boolean $foreman_plugin_hooks = false, + Boolean $foreman_plugin_memcache = false, + Boolean $foreman_plugin_remote_execution = false, + Boolean $foreman_plugin_tasks = false, + Boolean $foreman_plugin_templates = false, + String $foreman_proxy_foreman_base_url = undef, + Boolean $foreman_proxy_templates = false, + String $foreman_proxy_templates_listen_on = '', + Array[String] $foreman_proxy_trusted_hosts = [], + Boolean $foreman_proxy_dhcp = false, + String $foreman_proxy_dhcp_listen_on = '', + Boolean $foreman_proxy_dns = false, + Boolean $foreman_proxy_dhcp_managed = false, + String $foreman_proxy_dhcp_interface = '', + Array[String] $foreman_proxy_dhcp_option_domain = [], + Array[String] $foreman_proxy_dhcp_search_domains = [], + String $foreman_proxy_dhcp_server = false, + String $foreman_proxy_dhcp_provider = false, + Array[String] $foreman_proxy_dhcp_subnets = [], + String $foreman_proxy_dhcp_gateway = '', + String $foreman_proxy_dhcp_range = '', + String $foreman_proxy_dhcp_nameservers = '', + String $foreman_proxy_dhcp_pxeserver = '', + Boolean $foreman_proxy_dns_managed = false, + Array[String] $foreman_proxy_dns_forwarders = [], + String $foreman_proxy_dns_interface = '', + String $foreman_proxy_dns_listen_on = '', + String $foreman_proxy_dns_provider = '', + String $foreman_proxy_dns_zone = '', + String $foreman_proxy_dns_reverse = '', + String $foreman_proxy_dns_server = '', + Integer $foreman_proxy_dns_ttl = 8600, + Boolean $foreman_proxy_tftp = false, + Boolean $foreman_proxy_tftp_managed = false, + String $foreman_proxy_tftp_servername = '', + Boolean $foreman_proxy_tftp_manage_wget = false, + String $foreman_proxy_tftp_listen_on = '', + Boolean $foreman_proxy_bmc = false, + String $foreman_proxy_bmc_listen_on = '', + Array[String] $foreman_proxy2_hostnames = [], + String $foreman_proxy2_ipaddress = '', + Array[String] $foreman_proxy3_hostnames = [], + String $foreman_proxy3_ipaddress = '', + Array[String] $foreman_proxy4_hostnames = [], + String $foreman_proxy4_ipaddress = '', String $timezone = 'Etc/UTC', - Boolean $manage_packetfilter = true, + Boolean $manage_packetfilter = false, ) { $foreman_version = '1.15.6' @@ -225,7 +225,7 @@ $foreman_manage_memcached = true $foreman_memcached_max_memory = '8%' $foreman_url = "https://${facts['fqdn']}" - #$primary_names = unique([ "${facts['fqdn']}", "${facts['hostname']}", 'puppet', "puppet.${facts['domain']}" ]) + $primary_names = unique([ "${facts['fqdn']}", "${facts['hostname']}", 'puppet', "puppet.${facts['domain']}" ]) $foreman_serveraliases = $primary_names $foreman_puppetdb_dashboard_address = "http://${facts['fqdn']}:8080/pdb/dashboard" $foreman_puppetdb_address = "https://${facts['fqdn']}:8081/v2/commands"