Mercurial > repos > other > Puppet
comparison modules/epel/manifests/init.pp @ 387:66c075c5f54a
Update to newer Python module
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 03 Jan 2022 17:13:06 +0000 |
parents | c42fb28cff86 |
children |
comparison
equal
deleted
inserted
replaced
386:3fce34f642f1 | 387:66c075c5f54a |
---|---|
1 # Class epel | 1 # @summary Configure the proper EPEL repositories and import GPG keys |
2 # | 2 # |
3 # Actions: | 3 # @param epel_managed |
4 # Configure the proper repositories and import GPG keys | 4 # Determines if the main EPEL repository is managed. |
5 # @param epel_source_managed | |
6 # Determines if the `epel-source` repository is managed. | |
7 # @param epel_debuginfo_managed | |
8 # Determines if the `epel-debuginfo` repository is managed. | |
9 # @param epel_testing_managed | |
10 # Determines if the `epel-testing` repository is managed. | |
11 # @param epel_testing_source_managed | |
12 # Determines if the `epel-testing-source` repository is managed. | |
13 # @param epel_testing_debuginfo_managed | |
14 # Determines if the `epel-testing-debuginfo` repository is managed. | |
15 # @param epel_gpg_managed | |
16 # Detemines if the module manages the rpm-gpg key for EPEL. | |
5 # | 17 # |
6 # Requires: | 18 # @example Basic Usage |
7 # You should probably be on an Enterprise Linux variant. (Centos, RHEL, | 19 # include epel |
8 # Scientific, Oracle, Ascendos, et al) | |
9 # | 20 # |
10 # Sample Usage: | 21 # @see https://fedoraproject.org/wiki/EPEL |
11 # include epel | |
12 # | |
13 class epel ( | 22 class epel ( |
14 $epel_mirrorlist = $epel::params::epel_mirrorlist, | 23 $epel_mirrorlist = $epel::params::epel_mirrorlist, |
15 $epel_baseurl = $epel::params::epel_baseurl, | 24 $epel_baseurl = $epel::params::epel_baseurl, |
16 $epel_failovermethod = $epel::params::epel_failovermethod, | 25 $epel_failovermethod = $epel::params::epel_failovermethod, |
17 $epel_proxy = $epel::params::epel_proxy, | 26 $epel_proxy = $epel::params::epel_proxy, |
18 $epel_enabled = $epel::params::epel_enabled, | 27 $epel_enabled = $epel::params::epel_enabled, |
19 $epel_gpgcheck = $epel::params::epel_gpgcheck, | 28 $epel_gpgcheck = $epel::params::epel_gpgcheck, |
20 $epel_managed = $epel::params::epel_managed, | 29 $epel_repo_gpgcheck = $epel::params::epel_repo_gpgcheck, |
21 $epel_exclude = undef, | 30 $epel_metalink = $epel::params::epel_metalink, |
22 $epel_includepkgs = undef, | 31 Boolean $epel_managed = true, |
23 $epel_sslclientkey = undef, | 32 $epel_exclude = undef, |
24 $epel_sslclientcert = undef, | 33 $epel_includepkgs = undef, |
25 $epel_testing_mirrorlist = $epel::params::epel_testing_mirrorlist, | 34 $epel_sslclientkey = undef, |
26 $epel_testing_baseurl = $epel::params::epel_testing_baseurl, | 35 $epel_sslclientcert = undef, |
27 $epel_testing_failovermethod = $epel::params::epel_testing_failovermethod, | 36 Optional[String[1]] $epel_username = undef, |
28 $epel_testing_proxy = $epel::params::epel_testing_proxy, | 37 Optional[String[1]] $epel_password = undef, |
29 $epel_testing_enabled = $epel::params::epel_testing_enabled, | 38 $epel_testing_mirrorlist = $epel::params::epel_testing_mirrorlist, |
30 $epel_testing_gpgcheck = $epel::params::epel_testing_gpgcheck, | 39 $epel_testing_baseurl = $epel::params::epel_testing_baseurl, |
31 $epel_testing_managed = $epel::params::epel_testing_managed, | 40 $epel_testing_failovermethod = $epel::params::epel_testing_failovermethod, |
32 $epel_testing_exclude = undef, | 41 $epel_testing_proxy = $epel::params::epel_testing_proxy, |
33 $epel_testing_includepkgs = undef, | 42 $epel_testing_enabled = $epel::params::epel_testing_enabled, |
34 $epel_testing_sslclientkey = undef, | 43 $epel_testing_gpgcheck = $epel::params::epel_testing_gpgcheck, |
35 $epel_testing_sslclientcert = undef, | 44 $epel_testing_repo_gpgcheck = $epel::params::epel_testing_repo_gpgcheck, |
36 $epel_source_mirrorlist = $epel::params::epel_source_mirrorlist, | 45 $epel_testing_metalink = $epel::params::epel_testing_metalink, |
37 $epel_source_baseurl = $epel::params::epel_source_baseurl, | 46 Boolean $epel_testing_managed = true, |
38 $epel_source_failovermethod = $epel::params::epel_source_failovermethod, | 47 $epel_testing_exclude = undef, |
39 $epel_source_proxy = $epel::params::epel_source_proxy, | 48 $epel_testing_includepkgs = undef, |
40 $epel_source_enabled = $epel::params::epel_source_enabled, | 49 $epel_testing_sslclientkey = undef, |
41 $epel_source_gpgcheck = $epel::params::epel_source_gpgcheck, | 50 $epel_testing_sslclientcert = undef, |
42 $epel_source_managed = $epel::params::epel_source_managed, | 51 Optional[String[1]] $epel_testing_username = undef, |
43 $epel_source_exclude = undef, | 52 Optional[String[1]] $epel_testing_password = undef, |
44 $epel_source_includepkgs = undef, | 53 $epel_source_mirrorlist = $epel::params::epel_source_mirrorlist, |
45 $epel_source_sslclientkey = undef, | 54 $epel_source_baseurl = $epel::params::epel_source_baseurl, |
46 $epel_source_sslclientcert = undef, | 55 $epel_source_failovermethod = $epel::params::epel_source_failovermethod, |
47 $epel_debuginfo_mirrorlist = $epel::params::epel_debuginfo_mirrorlist, | 56 $epel_source_proxy = $epel::params::epel_source_proxy, |
48 $epel_debuginfo_baseurl = $epel::params::epel_debuginfo_baseurl, | 57 $epel_source_enabled = $epel::params::epel_source_enabled, |
49 $epel_debuginfo_failovermethod = $epel::params::epel_debuginfo_failovermethod, | 58 $epel_source_gpgcheck = $epel::params::epel_source_gpgcheck, |
50 $epel_debuginfo_proxy = $epel::params::epel_debuginfo_proxy, | 59 $epel_source_repo_gpgcheck = $epel::params::epel_source_repo_gpgcheck, |
51 $epel_debuginfo_enabled = $epel::params::epel_debuginfo_enabled, | 60 $epel_source_metalink = $epel::params::epel_source_metalink, |
52 $epel_debuginfo_gpgcheck = $epel::params::epel_debuginfo_gpgcheck, | 61 Boolean $epel_source_managed = true, |
53 $epel_debuginfo_managed = $epel::params::epel_debuginfo_managed, | 62 $epel_source_exclude = undef, |
54 $epel_debuginfo_exclude = undef, | 63 $epel_source_includepkgs = undef, |
55 $epel_debuginfo_includepkgs = undef, | 64 $epel_source_sslclientkey = undef, |
56 $epel_debuginfo_sslclientkey = undef, | 65 $epel_source_sslclientcert = undef, |
57 $epel_debuginfo_sslclientcert = undef, | 66 Optional[String[1]] $epel_source_username = undef, |
58 $epel_testing_source_mirrorlist = $epel::params::epel_testing_source_mirrorlist, | 67 Optional[String[1]] $epel_source_password = undef, |
59 $epel_testing_source_baseurl = $epel::params::epel_testing_source_baseurl, | 68 $epel_debuginfo_mirrorlist = $epel::params::epel_debuginfo_mirrorlist, |
60 $epel_testing_source_failovermethod = $epel::params::epel_testing_source_failovermethod, | 69 $epel_debuginfo_baseurl = $epel::params::epel_debuginfo_baseurl, |
61 $epel_testing_source_proxy = $epel::params::epel_testing_source_proxy, | 70 $epel_debuginfo_failovermethod = $epel::params::epel_debuginfo_failovermethod, |
62 $epel_testing_source_enabled = $epel::params::epel_testing_source_enabled, | 71 $epel_debuginfo_proxy = $epel::params::epel_debuginfo_proxy, |
63 $epel_testing_source_gpgcheck = $epel::params::epel_testing_source_gpgcheck, | 72 $epel_debuginfo_enabled = $epel::params::epel_debuginfo_enabled, |
64 $epel_testing_source_managed = $epel::params::epel_testing_source_managed, | 73 $epel_debuginfo_gpgcheck = $epel::params::epel_debuginfo_gpgcheck, |
65 $epel_testing_source_exclude = undef, | 74 $epel_debuginfo_repo_gpgcheck = $epel::params::epel_debuginfo_repo_gpgcheck, |
66 $epel_testing_source_includepkgs = undef, | 75 $epel_debuginfo_metalink = $epel::params::epel_debuginfo_metalink, |
67 $epel_testing_source_sslclientkey = undef, | 76 Boolean $epel_debuginfo_managed = true, |
68 $epel_testing_source_sslclientcert = undef, | 77 $epel_debuginfo_exclude = undef, |
69 $epel_testing_debuginfo_mirrorlist = $epel::params::epel_testing_debuginfo_mirrorlist, | 78 $epel_debuginfo_includepkgs = undef, |
70 $epel_testing_debuginfo_baseurl = $epel::params::epel_testing_debuginfo_baseurl, | 79 $epel_debuginfo_sslclientkey = undef, |
71 $epel_testing_debuginfo_failovermethod = $epel::params::epel_testing_debuginfo_failovermethod, | 80 $epel_debuginfo_sslclientcert = undef, |
72 $epel_testing_debuginfo_proxy = $epel::params::epel_testing_debuginfo_proxy, | 81 Optional[String[1]] $epel_debuginfo_username = undef, |
73 $epel_testing_debuginfo_enabled = $epel::params::epel_testing_debuginfo_enabled, | 82 Optional[String[1]] $epel_debuginfo_password = undef, |
74 $epel_testing_debuginfo_gpgcheck = $epel::params::epel_testing_debuginfo_gpgcheck, | 83 $epel_testing_source_mirrorlist = $epel::params::epel_testing_source_mirrorlist, |
75 $epel_testing_debuginfo_managed = $epel::params::epel_testing_debuginfo_managed, | 84 $epel_testing_source_baseurl = $epel::params::epel_testing_source_baseurl, |
76 $epel_testing_debuginfo_exclude = undef, | 85 $epel_testing_source_failovermethod = $epel::params::epel_testing_source_failovermethod, |
77 $epel_testing_debuginfo_includepkgs = undef, | 86 $epel_testing_source_proxy = $epel::params::epel_testing_source_proxy, |
78 $epel_testing_debuginfo_sslclientkey = undef, | 87 $epel_testing_source_enabled = $epel::params::epel_testing_source_enabled, |
79 $epel_testing_debuginfo_sslclientcert = undef, | 88 $epel_testing_source_gpgcheck = $epel::params::epel_testing_source_gpgcheck, |
80 $epel_gpg_managed = $epel::params::epel_gpg_managed, | 89 $epel_testing_source_repo_gpgcheck = $epel::params::epel_testing_source_repo_gpgcheck, |
81 $os_maj_release = $epel::params::os_maj_release, | 90 $epel_testing_source_metalink = $epel::params::epel_testing_source_metalink, |
91 Boolean $epel_testing_source_managed = true, | |
92 $epel_testing_source_exclude = undef, | |
93 $epel_testing_source_includepkgs = undef, | |
94 $epel_testing_source_sslclientkey = undef, | |
95 $epel_testing_source_sslclientcert = undef, | |
96 Optional[String[1]] $epel_testing_source_username = undef, | |
97 Optional[String[1]] $epel_testing_source_password = undef, | |
98 $epel_testing_debuginfo_mirrorlist = $epel::params::epel_testing_debuginfo_mirrorlist, | |
99 $epel_testing_debuginfo_baseurl = $epel::params::epel_testing_debuginfo_baseurl, | |
100 $epel_testing_debuginfo_failovermethod = $epel::params::epel_testing_debuginfo_failovermethod, | |
101 $epel_testing_debuginfo_proxy = $epel::params::epel_testing_debuginfo_proxy, | |
102 $epel_testing_debuginfo_enabled = $epel::params::epel_testing_debuginfo_enabled, | |
103 $epel_testing_debuginfo_gpgcheck = $epel::params::epel_testing_debuginfo_gpgcheck, | |
104 $epel_testing_debuginfo_repo_gpgcheck = $epel::params::epel_testing_debuginfo_repo_gpgcheck, | |
105 $epel_testing_debuginfo_metalink = $epel::params::epel_testing_debuginfo_metalink, | |
106 Boolean $epel_testing_debuginfo_managed = true, | |
107 $epel_testing_debuginfo_exclude = undef, | |
108 $epel_testing_debuginfo_includepkgs = undef, | |
109 $epel_testing_debuginfo_sslclientkey = undef, | |
110 $epel_testing_debuginfo_sslclientcert = undef, | |
111 Optional[String[1]] $epel_testing_debuginfo_username = undef, | |
112 Optional[String[1]] $epel_testing_debuginfo_password = undef, | |
113 Boolean $epel_gpg_managed = true, | |
114 $os_maj_release = $epel::params::os_maj_release, | |
82 ) inherits epel::params { | 115 ) inherits epel::params { |
83 if "${::osfamily}" == 'RedHat' and "${::operatingsystem}" !~ /Fedora|Amazon/ { # lint:ignore:only_variable_string | 116 if $facts['os']['family'] == 'RedHat' and $facts['os']['name'] != 'Fedora' { |
84 if $epel_testing_managed { | 117 if $epel_testing_managed { |
85 yumrepo { 'epel-testing': | 118 yumrepo { 'epel-testing': |
86 # lint:ignore:selector_inside_resource | 119 # lint:ignore:selector_inside_resource |
87 mirrorlist => $epel_testing_baseurl ? { | 120 mirrorlist => $epel_testing_baseurl ? { |
88 'absent' => $epel_testing_mirrorlist, | 121 'absent' => $epel_testing_mirrorlist, |
89 default => 'absent', | 122 default => 'absent', |
90 }, | 123 }, |
91 # lint:endignore | 124 # lint:endignore |
92 baseurl => $epel_testing_baseurl, | 125 baseurl => $epel_testing_baseurl, |
93 failovermethod => $epel_testing_failovermethod, | 126 failovermethod => $epel_testing_failovermethod, |
94 proxy => $epel_testing_proxy, | 127 proxy => $epel_testing_proxy, |
95 enabled => $epel_testing_enabled, | 128 enabled => $epel_testing_enabled, |
96 gpgcheck => $epel_testing_gpgcheck, | 129 gpgcheck => $epel_testing_gpgcheck, |
97 gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${os_maj_release}", | 130 repo_gpgcheck => $epel_testing_repo_gpgcheck, |
98 descr => "Extra Packages for Enterprise Linux ${os_maj_release} - Testing - \$basearch", | 131 gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${os_maj_release}", |
99 exclude => $epel_testing_exclude, | 132 metalink => $epel_testing_metalink, |
100 includepkgs => $epel_testing_includepkgs, | 133 descr => "Extra Packages for Enterprise Linux ${os_maj_release} - Testing - \$basearch", |
101 sslclientkey => $epel_testing_sslclientkey, | 134 exclude => $epel_testing_exclude, |
102 sslclientcert => $epel_testing_sslclientcert, | 135 includepkgs => $epel_testing_includepkgs, |
103 } | 136 sslclientkey => $epel_testing_sslclientkey, |
104 } | 137 sslclientcert => $epel_testing_sslclientcert, |
105 | 138 username => $epel_testing_username, |
106 if $epel_testing_debuginfo_managed { | 139 password => $epel_testing_password, |
107 yumrepo { 'epel-testing-debuginfo': | 140 } |
108 # lint:ignore:selector_inside_resource | 141 |
109 mirrorlist => $epel_testing_debuginfo_baseurl ? { | 142 if $epel_gpg_managed { |
110 'absent' => $epel_testing_debuginfo_mirrorlist, | 143 Epel::Rpm_gpg_key["EPEL-${os_maj_release}"] -> Yumrepo['epel-testing'] |
111 default => 'absent', | 144 } |
112 }, | 145 } |
113 # lint:endignore | 146 |
114 baseurl => $epel_testing_debuginfo_baseurl, | 147 if $epel_testing_debuginfo_managed { |
115 failovermethod => $epel_testing_debuginfo_failovermethod, | 148 yumrepo { 'epel-testing-debuginfo': |
116 proxy => $epel_testing_debuginfo_proxy, | 149 # lint:ignore:selector_inside_resource |
117 enabled => $epel_testing_debuginfo_enabled, | 150 mirrorlist => $epel_testing_debuginfo_baseurl ? { |
118 gpgcheck => $epel_testing_debuginfo_gpgcheck, | 151 'absent' => $epel_testing_debuginfo_mirrorlist, |
119 gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${os_maj_release}", | 152 default => 'absent', |
120 descr => "Extra Packages for Enterprise Linux ${os_maj_release} - Testing - \$basearch - Debug", | 153 }, |
121 exclude => $epel_testing_debuginfo_exclude, | 154 # lint:endignore |
122 includepkgs => $epel_testing_debuginfo_includepkgs, | 155 baseurl => $epel_testing_debuginfo_baseurl, |
123 sslclientkey => $epel_testing_debuginfo_sslclientkey, | 156 failovermethod => $epel_testing_debuginfo_failovermethod, |
124 sslclientcert => $epel_testing_debuginfo_sslclientcert, | 157 proxy => $epel_testing_debuginfo_proxy, |
125 } | 158 enabled => $epel_testing_debuginfo_enabled, |
126 } | 159 gpgcheck => $epel_testing_debuginfo_gpgcheck, |
127 | 160 repo_gpgcheck => $epel_testing_debuginfo_repo_gpgcheck, |
128 if $epel_testing_source_managed { | 161 gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${os_maj_release}", |
129 yumrepo { 'epel-testing-source': | 162 metalink => $epel_testing_debuginfo_metalink, |
130 # lint:ignore:selector_inside_resource | 163 descr => "Extra Packages for Enterprise Linux ${os_maj_release} - Testing - \$basearch - Debug", |
131 mirrorlist => $epel_testing_source_baseurl ? { | 164 exclude => $epel_testing_debuginfo_exclude, |
132 'absent' => $epel_testing_source_mirrorlist, | 165 includepkgs => $epel_testing_debuginfo_includepkgs, |
133 default => 'absent', | 166 sslclientkey => $epel_testing_debuginfo_sslclientkey, |
134 }, | 167 sslclientcert => $epel_testing_debuginfo_sslclientcert, |
135 # lint:endignore | 168 username => $epel_testing_debuginfo_username, |
136 baseurl => $epel_testing_source_baseurl, | 169 password => $epel_testing_debuginfo_password, |
137 failovermethod => $epel_testing_source_failovermethod, | 170 } |
138 proxy => $epel_testing_source_proxy, | 171 |
139 enabled => $epel_testing_source_enabled, | 172 if $epel_gpg_managed { |
140 gpgcheck => $epel_testing_source_gpgcheck, | 173 Epel::Rpm_gpg_key["EPEL-${os_maj_release}"] -> Yumrepo['epel-testing-debuginfo'] |
141 gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${os_maj_release}", | 174 } |
142 descr => "Extra Packages for Enterprise Linux ${os_maj_release} - Testing - \$basearch - Source", | 175 } |
143 exclude => $epel_testing_source_exclude, | 176 |
144 includepkgs => $epel_testing_source_includepkgs, | 177 if $epel_testing_source_managed { |
145 sslclientkey => $epel_testing_source_sslclientkey, | 178 yumrepo { 'epel-testing-source': |
146 sslclientcert => $epel_testing_source_sslclientcert, | 179 # lint:ignore:selector_inside_resource |
147 } | 180 mirrorlist => $epel_testing_source_baseurl ? { |
148 } | 181 'absent' => $epel_testing_source_mirrorlist, |
149 | 182 default => 'absent', |
150 if $epel_managed { | 183 }, |
151 yumrepo { 'epel': | 184 # lint:endignore |
152 # lint:ignore:selector_inside_resource | 185 baseurl => $epel_testing_source_baseurl, |
153 mirrorlist => $epel_baseurl ? { | 186 failovermethod => $epel_testing_source_failovermethod, |
154 'absent' => $epel_mirrorlist, | 187 proxy => $epel_testing_source_proxy, |
155 default => 'absent', | 188 enabled => $epel_testing_source_enabled, |
156 }, | 189 gpgcheck => $epel_testing_source_gpgcheck, |
157 # lint:endignore | 190 repo_gpgcheck => $epel_testing_source_repo_gpgcheck, |
158 baseurl => $epel_baseurl, | 191 gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${os_maj_release}", |
159 failovermethod => $epel_failovermethod, | 192 metalink => $epel_testing_source_metalink, |
160 proxy => $epel_proxy, | 193 descr => "Extra Packages for Enterprise Linux ${os_maj_release} - Testing - \$basearch - Source", |
161 enabled => $epel_enabled, | 194 exclude => $epel_testing_source_exclude, |
162 gpgcheck => $epel_gpgcheck, | 195 includepkgs => $epel_testing_source_includepkgs, |
163 gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${os_maj_release}", | 196 sslclientkey => $epel_testing_source_sslclientkey, |
164 descr => "Extra Packages for Enterprise Linux ${os_maj_release} - \$basearch", | 197 sslclientcert => $epel_testing_source_sslclientcert, |
165 exclude => $epel_exclude, | 198 username => $epel_testing_source_username, |
166 includepkgs => $epel_includepkgs, | 199 password => $epel_testing_source_password, |
167 sslclientkey => $epel_sslclientkey, | 200 } |
168 sslclientcert => $epel_sslclientcert, | 201 |
169 } | 202 if $epel_gpg_managed { |
170 } | 203 Epel::Rpm_gpg_key["EPEL-${os_maj_release}"] -> Yumrepo['epel-testing-source'] |
171 | 204 } |
172 if $epel_debuginfo_managed { | 205 } |
173 yumrepo { 'epel-debuginfo': | 206 |
174 # lint:ignore:selector_inside_resource | 207 if $epel_managed { |
175 mirrorlist => $epel_debuginfo_baseurl ? { | 208 yumrepo { 'epel': |
176 'absent' => $epel_debuginfo_mirrorlist, | 209 # lint:ignore:selector_inside_resource |
177 default => 'absent', | 210 mirrorlist => $epel_baseurl ? { |
178 }, | 211 'absent' => $epel_mirrorlist, |
179 # lint:endignore | 212 default => 'absent', |
180 baseurl => $epel_debuginfo_baseurl, | 213 }, |
181 failovermethod => $epel_debuginfo_failovermethod, | 214 # lint:endignore |
182 proxy => $epel_debuginfo_proxy, | 215 baseurl => $epel_baseurl, |
183 enabled => $epel_debuginfo_enabled, | 216 failovermethod => $epel_failovermethod, |
184 gpgcheck => $epel_debuginfo_gpgcheck, | 217 proxy => $epel_proxy, |
185 gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${os_maj_release}", | 218 enabled => $epel_enabled, |
186 descr => "Extra Packages for Enterprise Linux ${os_maj_release} - \$basearch - Debug", | 219 gpgcheck => $epel_gpgcheck, |
187 exclude => $epel_debuginfo_exclude, | 220 repo_gpgcheck => $epel_repo_gpgcheck, |
188 includepkgs => $epel_debuginfo_includepkgs, | 221 gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${os_maj_release}", |
189 sslclientkey => $epel_debuginfo_sslclientkey, | 222 metalink => $epel_metalink, |
190 sslclientcert => $epel_debuginfo_sslclientcert, | 223 descr => "Extra Packages for Enterprise Linux ${os_maj_release} - \$basearch", |
191 } | 224 exclude => $epel_exclude, |
192 } | 225 includepkgs => $epel_includepkgs, |
193 | 226 sslclientkey => $epel_sslclientkey, |
194 if $epel_source_managed { | 227 sslclientcert => $epel_sslclientcert, |
195 yumrepo { 'epel-source': | 228 username => $epel_username, |
196 # lint:ignore:selector_inside_resource | 229 password => $epel_password, |
197 mirrorlist => $epel_source_baseurl ? { | 230 } |
198 'absent' => $epel_source_mirrorlist, | 231 |
199 default => 'absent', | 232 if $epel_gpg_managed { |
200 }, | 233 Epel::Rpm_gpg_key["EPEL-${os_maj_release}"] -> Yumrepo['epel'] |
201 # lint:endignore | 234 } |
202 baseurl => $epel_source_baseurl, | 235 } |
203 failovermethod => $epel_source_failovermethod, | 236 |
204 proxy => $epel_source_proxy, | 237 if $epel_debuginfo_managed { |
205 enabled => $epel_source_enabled, | 238 yumrepo { 'epel-debuginfo': |
206 gpgcheck => $epel_source_gpgcheck, | 239 # lint:ignore:selector_inside_resource |
207 gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${os_maj_release}", | 240 mirrorlist => $epel_debuginfo_baseurl ? { |
208 descr => "Extra Packages for Enterprise Linux ${os_maj_release} - \$basearch - Source", | 241 'absent' => $epel_debuginfo_mirrorlist, |
209 exclude => $epel_source_exclude, | 242 default => 'absent', |
210 includepkgs => $epel_source_includepkgs, | 243 }, |
211 sslclientkey => $epel_source_sslclientkey, | 244 # lint:endignore |
212 sslclientcert => $epel_source_sslclientcert, | 245 baseurl => $epel_debuginfo_baseurl, |
213 } | 246 failovermethod => $epel_debuginfo_failovermethod, |
214 } | 247 proxy => $epel_debuginfo_proxy, |
215 | 248 enabled => $epel_debuginfo_enabled, |
216 # ERB template used here to ensure file content is in the Puppet catalog; | 249 gpgcheck => $epel_debuginfo_gpgcheck, |
217 # nothing is interpolated in these templates. | 250 repo_gpgcheck => $epel_debuginfo_repo_gpgcheck, |
218 if $epel_gpg_managed { | 251 gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${os_maj_release}", |
219 file { "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${os_maj_release}": | 252 descr => "Extra Packages for Enterprise Linux ${os_maj_release} - \$basearch - Debug", |
220 ensure => present, | 253 metalink => $epel_debuginfo_metalink, |
221 owner => 'root', | 254 exclude => $epel_debuginfo_exclude, |
222 group => 'root', | 255 includepkgs => $epel_debuginfo_includepkgs, |
223 mode => '0644', | 256 sslclientkey => $epel_debuginfo_sslclientkey, |
224 content => template("epel/RPM-GPG-KEY-EPEL-${os_maj_release}.erb"), | 257 sslclientcert => $epel_debuginfo_sslclientcert, |
225 } | 258 username => $epel_debuginfo_username, |
226 | 259 password => $epel_debuginfo_password, |
227 epel::rpm_gpg_key{ "EPEL-${os_maj_release}": | 260 } |
228 path => "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${os_maj_release}", | 261 |
229 } | 262 if $epel_gpg_managed { |
230 } | 263 Epel::Rpm_gpg_key["EPEL-${os_maj_release}"] -> Yumrepo['epel-debuginfo'] |
231 | 264 } |
232 } elsif "${::osfamily}" == 'RedHat' and "${::operatingsystem}" == 'Amazon' { # lint:ignore:only_variable_string | 265 } |
233 if $epel_managed { | 266 |
234 yumrepo { 'epel': | 267 if $epel_source_managed { |
235 enabled => $epel_enabled, | 268 yumrepo { 'epel-source': |
236 gpgcheck => $epel_gpgcheck, | 269 # lint:ignore:selector_inside_resource |
237 } | 270 mirrorlist => $epel_source_baseurl ? { |
238 } | 271 'absent' => $epel_source_mirrorlist, |
272 default => 'absent', | |
273 }, | |
274 # lint:endignore | |
275 baseurl => $epel_source_baseurl, | |
276 failovermethod => $epel_source_failovermethod, | |
277 proxy => $epel_source_proxy, | |
278 enabled => $epel_source_enabled, | |
279 gpgcheck => $epel_source_gpgcheck, | |
280 repo_gpgcheck => $epel_source_repo_gpgcheck, | |
281 gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${os_maj_release}", | |
282 descr => "Extra Packages for Enterprise Linux ${os_maj_release} - \$basearch - Source", | |
283 metalink => $epel_source_metalink, | |
284 exclude => $epel_source_exclude, | |
285 includepkgs => $epel_source_includepkgs, | |
286 sslclientkey => $epel_source_sslclientkey, | |
287 sslclientcert => $epel_source_sslclientcert, | |
288 username => $epel_source_username, | |
289 password => $epel_source_password, | |
290 } | |
291 | |
292 if $epel_gpg_managed { | |
293 Epel::Rpm_gpg_key["EPEL-${os_maj_release}"] -> Yumrepo['epel-source'] | |
294 } | |
295 } | |
296 | |
297 if $epel_gpg_managed { | |
298 file { "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${os_maj_release}": | |
299 ensure => file, | |
300 owner => 'root', | |
301 group => 'root', | |
302 mode => '0644', | |
303 content => file("epel/RPM-GPG-KEY-EPEL-${os_maj_release}"), | |
304 } | |
305 | |
306 epel::rpm_gpg_key { "EPEL-${os_maj_release}": | |
307 path => "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${os_maj_release}", | |
308 } | |
309 } | |
239 } else { | 310 } else { |
240 notice ("Your operating system ${::operatingsystem} will not have the EPEL repository applied") | 311 notice ("Your operating system ${facts['os']['name']} will not have the EPEL repository applied") |
241 } | 312 } |
242 } | 313 } |