File tree Expand file tree Collapse file tree 2 files changed +29
-4
lines changed Expand file tree Collapse file tree 2 files changed +29
-4
lines changed Original file line number Diff line number Diff line change 33) {
44 assert_private()
55
6+ $pa_collection = getvar(' ::puppet_agent::collection' )
7+
68 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+ }
814 }
915 elsif $::operatingsystem == ' Amazon' {
1016 $urlbit = ' el/6'
1319 $urlbit = ' el/$releasever'
1420 }
1521
16- $pa_collection = getvar(' ::puppet_agent::collection' )
17-
1822 if getvar(' ::puppet_agent::is_pe' ) == true {
1923 # In Puppet Enterprise, agent packages are served by the same server
2024 # as the master, which can be using either a self signed CA, or an external CA.
4246 $_sslcacert_path = undef
4347 $_sslclientcert_path = undef
4448 $_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+ }
4555 $source = getvar(' ::puppet_agent::source' ) ? {
46- undef => " http://yum.puppetlabs.com/ ${urlbit} / ${pa_collection} / ${::architecture} " ,
56+ undef => $_default_source ,
4757 default => getvar(' ::puppet_agent::source' ),
4858 }
4959 }
Original file line number Diff line number Diff line change 8989 it { is_expected . to contain_class ( "puppet_agent::osfamily::redhat" ) }
9090 end
9191
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
92107 end
93108 end
94109
You can’t perform that action at this time.
0 commit comments