File tree 2 files changed +29
-4
lines changed
2 files changed +29
-4
lines changed Original file line number Diff line number Diff line change 3
3
) {
4
4
assert_private()
5
5
6
+ $pa_collection = getvar(' ::puppet_agent::collection' )
7
+
6
8
if $::operatingsystem == ' Fedora' {
7
- $urlbit = ' fedora/f$releasever'
9
+ if $pa_collection == ' PC1' {
10
+ $urlbit = ' fedora/f$releasever'
11
+ } else {
12
+ $urlbit = ' fedora/$releasever'
13
+ }
8
14
}
9
15
elsif $::operatingsystem == ' Amazon' {
10
16
$urlbit = ' el/6'
13
19
$urlbit = ' el/$releasever'
14
20
}
15
21
16
- $pa_collection = getvar(' ::puppet_agent::collection' )
17
-
18
22
if getvar(' ::puppet_agent::is_pe' ) == true {
19
23
# In Puppet Enterprise, agent packages are served by the same server
20
24
# as the master, which can be using either a self signed CA, or an external CA.
42
46
$_sslcacert_path = undef
43
47
$_sslclientcert_path = undef
44
48
$_sslclientkey_path = undef
49
+
50
+ if $pa_collection == ' PC1' {
51
+ $_default_source = " http://yum.puppetlabs.com/${urlbit} /${pa_collection} /${::architecture} "
52
+ } else {
53
+ $_default_source = " http://yum.puppetlabs.com/${pa_collection} /${urlbit} /${::architecture} "
54
+ }
45
55
$source = getvar(' ::puppet_agent::source' ) ? {
46
- undef => " http://yum.puppetlabs.com/ ${urlbit} / ${pa_collection} / ${::architecture} " ,
56
+ undef => $_default_source ,
47
57
default => getvar(' ::puppet_agent::source' ),
48
58
}
49
59
}
Original file line number Diff line number Diff line change 89
89
it { is_expected . to contain_class ( "puppet_agent::osfamily::redhat" ) }
90
90
end
91
91
92
+ context 'when installing a puppet5 project' do
93
+ let ( :params ) {
94
+ {
95
+ :package_version => '5.2.0' ,
96
+ :collection => 'puppet5'
97
+ }
98
+ }
99
+ it { is_expected . to contain_yumrepo ( 'pc_repo' ) . with ( {
100
+ # We no longer expect the 'f' in fedora repos
101
+ 'baseurl' => "http://yum.puppetlabs.com/puppet5/#{ urlbit . gsub ( '/f' , '/' ) } /x64" ,
102
+ 'enabled' => 'true' ,
103
+ 'gpgcheck' => '1' ,
104
+ 'gpgkey' => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs\n file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet" ,
105
+ } ) }
106
+ end
92
107
end
93
108
end
94
109
You can’t perform that action at this time.
0 commit comments