RHEL support for salt.

Updates to the salt modules so that they run on RHEL.

Change-Id: Ibdbc35594a018a7f49f3785d527e5c1a71a92a2e
Reviewed-on: https://review.openstack.org/23188
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Khai Do <zaro0508@gmail.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
Dan Prince 2013-02-28 12:47:37 -05:00 committed by Jenkins
parent 2f609a7223
commit 926bf44fe6
2 changed files with 32 additions and 22 deletions

View File

@ -3,23 +3,28 @@
class salt ( class salt (
$salt_master = $::fqdn $salt_master = $::fqdn
) { ) {
include apt
# Wrap in ! defined checks to allow minion and master installs on the if ($::operatingsystem == 'Ubuntu') {
# same host. include apt
if ! defined(Apt::Ppa['ppa:saltstack/salt']) {
apt::ppa { 'ppa:saltstack/salt': }
}
if ! defined(Package['python-software-properties']) { # Wrap in ! defined checks to allow minion and master installs on the
package { 'python-software-properties': # same host.
ensure => present, if ! defined(Apt::Ppa['ppa:saltstack/salt']) {
apt::ppa { 'ppa:saltstack/salt': }
} }
if ! defined(Package['python-software-properties']) {
package { 'python-software-properties':
ensure => present,
}
}
Apt::Ppa['ppa:saltstack/salt'] -> Package['salt-minion']
} }
package { 'salt-minion': package { 'salt-minion':
ensure => present, ensure => present
require => Apt::Ppa['ppa:saltstack/salt'],
} }
file { '/etc/salt/minion': file { '/etc/salt/minion':

View File

@ -1,23 +1,28 @@
# Class salt::master # Class salt::master
# #
class salt::master { class salt::master {
include apt
# Wrap in ! defined checks to allow minion and master installs on the if ($::operatingsystem == 'Ubuntu') {
# same host. include apt
if ! defined(Apt::Ppa['ppa:saltstack/salt']) {
apt::ppa { 'ppa:saltstack/salt': }
}
if ! defined(Package['python-software-properties']) { # Wrap in ! defined checks to allow minion and master installs on the
package { 'python-software-properties': # same host.
ensure => present, if ! defined(Apt::Ppa['ppa:saltstack/salt']) {
apt::ppa { 'ppa:saltstack/salt': }
} }
if ! defined(Package['python-software-properties']) {
package { 'python-software-properties':
ensure => present,
}
}
Apt::Ppa['ppa:saltstack/salt'] -> Package['salt-master']
} }
package { 'salt-master': package { 'salt-master':
ensure => present, ensure => present
require => Apt::Ppa['ppa:saltstack/salt'],
} }
group { 'salt': group { 'salt':