Move package resources to o_p::server
Once nodepool is building worker images with these packages already installed, we don't need to manage them in the common openstack_project::template class. This patch moves them over to openstack_project::server so that it is obvious that puppet doesn't need to manage them for both single-use workers and long-lived servers. Eventually the openstack_project::template class should be empty and we can remove it. Depends-On: Ie1a0aba57390c9c0b269b4cbb076090ae1de73a9 Change-Id: I31295cdf12941e4adcf87a73418df1d17d9ec3d2
This commit is contained in:
parent
a883b74661
commit
df050bc7b6
@ -3,15 +3,26 @@
|
||||
# This class holds parameters that need to be
|
||||
# accessed by other classes.
|
||||
class openstack_project::params {
|
||||
$cross_platform_packages = [
|
||||
'at',
|
||||
'git',
|
||||
'lvm2',
|
||||
'parted',
|
||||
'puppet',
|
||||
'rsync',
|
||||
'strace',
|
||||
'tcpdump',
|
||||
'wget',
|
||||
]
|
||||
case $::osfamily {
|
||||
'RedHat': {
|
||||
$packages = ['parted', 'puppet', 'wget', 'iputils']
|
||||
$packages = concat($cross_platform_packages, ['iputils', 'bind-utils'])
|
||||
$user_packages = ['emacs-nox', 'vim-enhanced']
|
||||
$update_pkg_list_cmd = ''
|
||||
$login_defs = 'puppet:///modules/openstack_project/login.defs.redhat'
|
||||
}
|
||||
'Debian': {
|
||||
$packages = ['parted', 'puppet', 'wget', 'iputils-ping']
|
||||
$packages = concat($cross_platform_packages, ['iputils-ping', 'dnsutils'])
|
||||
case $::operatingsystemrelease {
|
||||
/^(12|14)\.(04|10)$/: {
|
||||
$user_packages = ['emacs23-nox', 'vim-nox', 'iftop',
|
||||
|
@ -18,6 +18,8 @@ class openstack_project::server (
|
||||
$pypi_index_url = 'https://pypi.python.org/simple',
|
||||
$purge_apt_sources = true,
|
||||
) {
|
||||
include openstack_project::params
|
||||
|
||||
if $::osfamily == 'Debian' {
|
||||
# Purge and augment existing /etc/apt/sources.list if requested, and make
|
||||
# sure apt-get update is run before any packages are installed
|
||||
@ -41,6 +43,11 @@ class openstack_project::server (
|
||||
Exec['update-apt'] -> Package <| |>
|
||||
}
|
||||
}
|
||||
|
||||
package { $::openstack_project::params::packages:
|
||||
ensure => present
|
||||
}
|
||||
|
||||
class { 'openstack_project::template':
|
||||
iptables_public_tcp_ports => $iptables_public_tcp_ports,
|
||||
iptables_public_udp_ports => $iptables_public_udp_ports,
|
||||
@ -57,4 +64,5 @@ class openstack_project::server (
|
||||
sysadmins => $sysadmins,
|
||||
pypi_index_url => $pypi_index_url,
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -101,6 +101,10 @@ class openstack_project::template (
|
||||
}
|
||||
}
|
||||
|
||||
package { 'rsyslog':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
if ($::in_chroot) {
|
||||
notify { 'rsyslog in chroot':
|
||||
message => 'rsyslog not refreshed, running in chroot',
|
||||
@ -163,59 +167,6 @@ class openstack_project::template (
|
||||
}
|
||||
}
|
||||
|
||||
###########################################################
|
||||
# Package resources for all operating systems
|
||||
|
||||
package { 'at':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
package { 'lvm2':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
package { 'strace':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
package { 'tcpdump':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
package { 'rsyslog':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
package { 'git':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
package { 'rsync':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
package { $::openstack_project::params::packages:
|
||||
ensure => present
|
||||
}
|
||||
|
||||
###########################################################
|
||||
# Package resources for specific operating systems
|
||||
|
||||
case $::osfamily {
|
||||
'Debian': {
|
||||
# Make sure dig is installed
|
||||
package { 'dnsutils':
|
||||
ensure => present,
|
||||
}
|
||||
}
|
||||
'RedHat': {
|
||||
# Make sure dig is installed
|
||||
package { 'bind-utils':
|
||||
ensure => present,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
###########################################################
|
||||
# Manage ntp
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user