|
2 | 2 | class puppet_agent::osfamily::redhat { |
3 | 3 | assert_private() |
4 | 4 |
|
5 | | - if $::puppet_agent::absolute_source { |
| 5 | + if $puppet_agent::absolute_source { |
6 | 6 | # Absolute sources are expected to be actual packages (not repos) |
7 | 7 | # so when absolute_source is set just download the package to the |
8 | 8 | # system and finish with this class. |
|
37 | 37 | true => "el-${amz_el_version}-${facts['os']['architecture']}", |
38 | 38 | default => $facts['platform_tag'], |
39 | 39 | } |
40 | | - if $::puppet_agent::source { |
41 | | - $source = "${::puppet_agent::source}/packages/${pe_server_version}/${pe_repo_dir}" |
42 | | - } elsif $::puppet_agent::alternate_pe_source { |
43 | | - $source = "${::puppet_agent::alternate_pe_source}/packages/${pe_server_version}/${pe_repo_dir}" |
| 40 | + if $puppet_agent::source { |
| 41 | + $source = "${puppet_agent::source}/packages/${pe_server_version}/${pe_repo_dir}" |
| 42 | + } elsif $puppet_agent::alternate_pe_source { |
| 43 | + $source = "${puppet_agent::alternate_pe_source}/packages/${pe_server_version}/${pe_repo_dir}" |
44 | 44 | } else { |
45 | 45 | $source = "https://${facts['puppet_master_server']}:8140/packages/${pe_server_version}/${pe_repo_dir}" |
46 | 46 | } |
47 | 47 | } else { |
48 | | - if $::puppet_agent::collection == 'PC1' { |
49 | | - $source = "${::puppet_agent::yum_source}/${platform_and_version}/${::puppet_agent::collection}/${::puppet_agent::arch}" |
| 48 | + if $puppet_agent::collection == 'PC1' { |
| 49 | + $source = "${puppet_agent::yum_source}/${platform_and_version}/${puppet_agent::collection}/${puppet_agent::arch}" |
50 | 50 | } else { |
51 | | - $source = "${::puppet_agent::yum_source}/${::puppet_agent::collection}/${platform_and_version}/${::puppet_agent::arch}" |
| 51 | + $source = "${puppet_agent::yum_source}/${puppet_agent::collection}/${platform_and_version}/${puppet_agent::arch}" |
52 | 52 | } |
53 | 53 | } |
54 | 54 |
|
55 | | - if ($::puppet_agent::is_pe and (!$::puppet_agent::use_alternate_sources)) { |
| 55 | + if ($puppet_agent::is_pe and (!$puppet_agent::use_alternate_sources)) { |
56 | 56 | # In Puppet Enterprise, agent packages are served by the same server |
57 | 57 | # as the master, which can be using either a self signed CA, or an external CA. |
58 | 58 | # In order for yum to authenticate to the yumrepo on the PE Master, it will need |
59 | 59 | # to be configured to pass in the agents certificates. By the time this code is called, |
60 | 60 | # the module has already moved the certs to $ssl_dir/{certs,private_keys}, which |
61 | 61 | # happen to be the default in PE already. |
62 | 62 |
|
63 | | - $_ssl_dir = $::puppet_agent::params::ssldir |
| 63 | + $_ssl_dir = $puppet_agent::params::ssldir |
64 | 64 | $_sslcacert_path = "${_ssl_dir}/certs/ca.pem" |
65 | 65 | $_sslclientcert_path = "${_ssl_dir}/certs/${facts['clientcert']}.pem" |
66 | 66 | $_sslclientkey_path = "${_ssl_dir}/private_keys/${facts['clientcert']}.pem" |
|
146 | 146 | logoutput => 'on_failure', |
147 | 147 | } |
148 | 148 |
|
149 | | - if $::puppet_agent::manage_repo == true { |
150 | | - $_proxy = $::puppet_agent::disable_proxy ? { |
| 149 | + if $puppet_agent::manage_repo == true { |
| 150 | + $_proxy = $puppet_agent::disable_proxy ? { |
151 | 151 | true => '_none_', |
152 | | - default => $::puppet_agent::proxy, |
| 152 | + default => $puppet_agent::proxy, |
153 | 153 | } |
154 | 154 | yumrepo { 'pc_repo': |
155 | 155 | baseurl => $source, |
156 | | - descr => "Puppet Labs ${::puppet_agent::collection} Repository", |
| 156 | + descr => "Puppet Labs ${puppet_agent::collection} Repository", |
157 | 157 | enabled => true, |
158 | 158 | gpgcheck => '1', |
159 | 159 | gpgkey => $gpg_keys, |
160 | 160 | proxy => $_proxy, |
161 | 161 | sslcacert => $_sslcacert_path, |
162 | 162 | sslclientcert => $_sslclientcert_path, |
163 | 163 | sslclientkey => $_sslclientkey_path, |
164 | | - skip_if_unavailable => $::puppet_agent::skip_if_unavailable, |
| 164 | + skip_if_unavailable => $puppet_agent::skip_if_unavailable, |
165 | 165 | } |
166 | 166 | } |
167 | 167 | } |
|
0 commit comments