Mercurial > repos > other > Puppet
diff manifests/templates.pp @ 32:6bbc86f6cee5 puppet-3.6
Tidy up ordering and dependencies (including making sure we have a necessary file for Fail2Ban to start)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 14 Mar 2015 19:33:06 +0000 |
parents | 13adb555a7e2 |
children | 1bb941522ebf |
line wrap: on
line diff
--- a/manifests/templates.pp Sat Mar 14 19:32:15 2015 +0000 +++ b/manifests/templates.pp Sat Mar 14 19:33:06 2015 +0000 @@ -1,3 +1,10 @@ +# Make sure packages come after their repos +YumRepo<| |> -> Package<| |> + +# Make sure all files are in place before starting services +File<| |> -> Service<| |> + + class basenode { $os = $operatingsystem $osver = "v${operatingsystemrelease}" @@ -73,7 +80,8 @@ } file { '/etc/pki/rpm-gpg/RPM-GPG-KEY-IBBoard-OBS': ensure => present, - source => 'puppet:///common/RPM-GPG-KEY-IBBoard-OBS' + source => 'puppet:///common/RPM-GPG-KEY-IBBoard-OBS', + before => YumRepo['ibboard'], } yumrepo { 'webtatic': mirrorlist => 'http://mirror.webtatic.com/yum/el6/$basearch/mirrorlist', @@ -85,7 +93,8 @@ } file { '/etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-andy': ensure => present, - source => 'puppet:///common/RPM-GPG-KEY-webtatic-andy' + source => 'puppet:///common/RPM-GPG-KEY-webtatic-andy', + before => YumRepo['webtatic'], } } @@ -211,6 +220,13 @@ content => '[Definition] logtarget = /var/log/fail2ban.log' } + # Because one of our rules checks fail2ban's log, but the service dies without the file + file { '/var/log/fail2ban.log': + ensure => present, + owner => 'root', + group => 'root', + mode => '0600', + } } #Our web server with our configs, not just a stock one