diff --git a/install_puppet.sh b/install_puppet.sh index f0cf7e04bd..30dacd62be 100755 --- a/install_puppet.sh +++ b/install_puppet.sh @@ -16,14 +16,8 @@ # License for the specific language governing permissions and limitations # under the License. -# -# Distro identification functions -# note, can't rely on lsb_release for these as we're bare-bones and -# it may not be installed yet) - -# # Test condition to install puppet 3 -PUPPET_VERSION=${PUPPET_VERSION:-2} +PUPPET_VERSION=${PUPPET_VERSION:-3} if [ "$PUPPET_VERSION" = '3' ]; then THREE=yes echo "Running in 3 mode" @@ -144,7 +138,7 @@ function setup_puppet_ubuntu { # NB: keep in sync with openstack_project/files/00-puppet.pref if [ "$THREE" == 'yes' ]; then - PUPPET_VERSION=3.6.* + PUPPET_VERSION=3.* PUPPETDB_TERMINUS_VERSION=2.* FACTER_VERSION=2.* else diff --git a/modules/openstack_project/files/centos-puppetlabs.repo b/modules/openstack_project/files/centos-puppetlabs.repo index 3637bc3e54..f35c1d3e2c 100644 --- a/modules/openstack_project/files/centos-puppetlabs.repo +++ b/modules/openstack_project/files/centos-puppetlabs.repo @@ -4,4 +4,4 @@ baseurl=http://yum.puppetlabs.com/el/6/products/$basearch gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs enabled=1 gpgcheck=1 -exclude=puppet-2.8* puppet-2.9* puppet-3* facter-2* +exclude=puppet-4* facter-3* puppetdb-terminus-3* diff --git a/modules/openstack_project/manifests/base.pp b/modules/openstack_project/manifests/base.pp index bedc28db3d..d34c862df1 100644 --- a/modules/openstack_project/manifests/base.pp +++ b/modules/openstack_project/manifests/base.pp @@ -3,7 +3,7 @@ class openstack_project::base( $certname = $::fqdn, $install_users = true, - $pin_puppet = '2.7.', + $pin_puppet = '3.', $ca_server = undef, ) { if ($::osfamily == 'Debian') { @@ -136,6 +136,15 @@ class openstack_project::base( replace => true, } + file { '/etc/apt/preferences.d/00-puppet.pref': + ensure => present, + owner => 'root', + group => 'root', + mode => '0444', + content => template('openstack_project/00-puppet.pref.erb'), + replace => true, + } + file { '/etc/default/puppet': ensure => present, owner => 'root', @@ -148,6 +157,14 @@ class openstack_project::base( } if ($::operatingsystem == 'CentOS') { + file { '/etc/yum.repos.d/puppetlabs.repo': + ensure => present, + owner => 'root', + group => 'root', + mode => '0444', + source => 'puppet:///modules/openstack_project/centos-puppetlabs.repo', + replace => true, + } file { '/etc/yum.conf': ensure => present, owner => 'root', diff --git a/modules/openstack_project/manifests/puppetmaster.pp b/modules/openstack_project/manifests/puppetmaster.pp index e857efac07..55c77c60bc 100644 --- a/modules/openstack_project/manifests/puppetmaster.pp +++ b/modules/openstack_project/manifests/puppetmaster.pp @@ -3,7 +3,7 @@ class openstack_project::puppetmaster ( $root_rsa_key, $sysadmins = [], - $version = '2.7.', + $version = '3.', $ca_server = undef, $puppetdb = true, $puppetdb_server = 'puppetdb.openstack.org', diff --git a/modules/openstack_project/manifests/server.pp b/modules/openstack_project/manifests/server.pp index 44d4c916e6..faf9e3a3ca 100644 --- a/modules/openstack_project/manifests/server.pp +++ b/modules/openstack_project/manifests/server.pp @@ -8,7 +8,7 @@ class openstack_project::server ( $iptables_rules6 = [], $sysadmins = [], $certname = $::fqdn, - $pin_puppet = '2.7.', + $pin_puppet = '3.', $ca_server = undef, ) { class { 'openstack_project::template': diff --git a/modules/openstack_project/manifests/template.pp b/modules/openstack_project/manifests/template.pp index 9c32acc4a5..eea4105cb1 100644 --- a/modules/openstack_project/manifests/template.pp +++ b/modules/openstack_project/manifests/template.pp @@ -7,7 +7,7 @@ class openstack_project::template ( $iptables_public_udp_ports = [], $iptables_rules4 = [], $iptables_rules6 = [], - $pin_puppet = '2.7.', + $pin_puppet = '3.', $install_users = true, $install_resolv_conf = true, $automatic_upgrades = true,