Move puppet service disablement to o_p::server

We don't need to stop the puppet service in single_use_slave, so as part
of emptying out openstack_project::template, move that resource
to openstack_project::server.

We still need to disable the service during the image build so add that
to the install_puppet.sh script.

Change-Id: I11db1b49f083c7a30e7908ba5a4a7df9d4033c9f
This commit is contained in:
Colleen Murphy 2017-04-08 21:30:56 +02:00 committed by Colleen Murphy
parent 54d48a7eff
commit 0929840479
3 changed files with 24 additions and 14 deletions

View File

@ -226,6 +226,11 @@ EOF
--assume-yes install -y --force-yes puppet git $rubypkg --assume-yes install -y --force-yes puppet git $rubypkg
# Wipe out templatedir so we don't get warnings about it # Wipe out templatedir so we don't get warnings about it
sed -i '/templatedir/d' /etc/puppet/puppet.conf sed -i '/templatedir/d' /etc/puppet/puppet.conf
if [ -f /bin/systemctl ]; then
systemctl disable puppet
else
service puppet disable
fi
} }
function setup_puppet_opensuse { function setup_puppet_opensuse {

View File

@ -135,6 +135,25 @@ class openstack_project::server (
require => Class['pip'], require => Class['pip'],
} }
###########################################################
# Turn off puppet service
service { 'puppet':
ensure => stopped,
enable => false,
}
if $::osfamily == 'Debian' {
file { '/etc/default/puppet':
ensure => present,
owner => 'root',
group => 'root',
mode => '0444',
source => 'puppet:///modules/openstack_project/puppet.default',
replace => true,
}
}
class { 'openstack_project::template': class { 'openstack_project::template':
iptables_public_tcp_ports => $iptables_public_tcp_ports, iptables_public_tcp_ports => $iptables_public_tcp_ports,
iptables_public_udp_ports => $iptables_public_udp_ports, iptables_public_udp_ports => $iptables_public_udp_ports,

View File

@ -180,16 +180,6 @@ class openstack_project::template (
source => 'puppet:///modules/openstack_project/90no-translations', source => 'puppet:///modules/openstack_project/90no-translations',
replace => true, replace => true,
} }
file { '/etc/default/puppet':
ensure => present,
owner => 'root',
group => 'root',
mode => '0444',
source => 'puppet:///modules/openstack_project/puppet.default',
replace => true,
}
} }
if ($::operatingsystem == 'CentOS') { if ($::operatingsystem == 'CentOS') {
@ -202,10 +192,6 @@ class openstack_project::template (
replace => true, replace => true,
} }
} }
service { 'puppet':
ensure => stopped,
enable => false,
}
########################################################### ###########################################################