diff --git a/modules/salt/manifests/init.pp b/modules/salt/manifests/init.pp index 64449a80ec..13523b642b 100644 --- a/modules/salt/manifests/init.pp +++ b/modules/salt/manifests/init.pp @@ -3,23 +3,28 @@ class salt ( $salt_master = $::fqdn ) { - include apt - # Wrap in ! defined checks to allow minion and master installs on the - # same host. - if ! defined(Apt::Ppa['ppa:saltstack/salt']) { - apt::ppa { 'ppa:saltstack/salt': } - } + if ($::operatingsystem == 'Ubuntu') { + include apt - if ! defined(Package['python-software-properties']) { - package { 'python-software-properties': - ensure => present, + # Wrap in ! defined checks to allow minion and master installs on the + # same host. + 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': - ensure => present, - require => Apt::Ppa['ppa:saltstack/salt'], + ensure => present } file { '/etc/salt/minion': diff --git a/modules/salt/manifests/master.pp b/modules/salt/manifests/master.pp index a87948bf68..c01c76fc66 100644 --- a/modules/salt/manifests/master.pp +++ b/modules/salt/manifests/master.pp @@ -1,23 +1,28 @@ # Class salt::master # class salt::master { - include apt - # Wrap in ! defined checks to allow minion and master installs on the - # same host. - if ! defined(Apt::Ppa['ppa:saltstack/salt']) { - apt::ppa { 'ppa:saltstack/salt': } - } + if ($::operatingsystem == 'Ubuntu') { + include apt - if ! defined(Package['python-software-properties']) { - package { 'python-software-properties': - ensure => present, + # Wrap in ! defined checks to allow minion and master installs on the + # same host. + 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': - ensure => present, - require => Apt::Ppa['ppa:saltstack/salt'], + ensure => present } group { 'salt':