diff --git a/.vagrant-puppet/manifests/default.pp b/.vagrant-puppet/manifests/default.pp index c902aca99..5a663c48b 100644 --- a/.vagrant-puppet/manifests/default.pp +++ b/.vagrant-puppet/manifests/default.pp @@ -10,13 +10,13 @@ include nagios-plugins # icinga 2 docs at /icinga2-doc file { '/etc/httpd/conf.d/icinga2-doc.conf': - source => 'puppet:////vagrant/.vagrant-puppet/files/etc/httpd/conf.d/icinga2-doc.conf', + source => 'puppet:////vagrant/.vagrant-puppet/files/etc/httpd/conf.d/icinga2-doc.conf', require => [ Package['apache'], Package['icinga2-doc'] ], - notify => Service['apache'] + notify => Service['apache'] } file { '/etc/motd': source => 'puppet:////vagrant/.vagrant-puppet/files/etc/motd', - owner => root, - group => root + owner => root, + group => root } diff --git a/.vagrant-puppet/modules/apache/manifests/init.pp b/.vagrant-puppet/modules/apache/manifests/init.pp index b5e871945..b3c21449a 100644 --- a/.vagrant-puppet/modules/apache/manifests/init.pp +++ b/.vagrant-puppet/modules/apache/manifests/init.pp @@ -20,19 +20,19 @@ class apache { package { $apache: ensure => installed, - alias => 'apache' + alias => 'apache' } exec { 'iptables-allow-http': - path => '/bin:/usr/bin:/sbin:/usr/sbin', - unless => 'grep -Fxqe "-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT" /etc/sysconfig/iptables', + path => '/bin:/usr/bin:/sbin:/usr/sbin', + unless => 'grep -Fxqe "-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT" /etc/sysconfig/iptables', command => 'lokkit --enabled --service=http' } service { $apache: - enable => true, - ensure => running, - alias => 'apache', + enable => true, + ensure => running, + alias => 'apache', require => [ Package['apache'], Exec['iptables-allow-http'] ] } } diff --git a/.vagrant-puppet/modules/cpan/manifests/init.pp b/.vagrant-puppet/modules/cpan/manifests/init.pp index 9cbdaf8b0..075fd72b9 100644 --- a/.vagrant-puppet/modules/cpan/manifests/init.pp +++ b/.vagrant-puppet/modules/cpan/manifests/init.pp @@ -31,7 +31,7 @@ define cpan( } file { [ '/root/.cpan/', '/root/.cpan/CPAN/' ]: - ensure => directory + ensure => directory } file { '/root/.cpan/CPAN/MyConfig.pm': diff --git a/.vagrant-puppet/modules/epel/manifests/init.pp b/.vagrant-puppet/modules/epel/manifests/init.pp index 69a45c156..c56f8310d 100644 --- a/.vagrant-puppet/modules/epel/manifests/init.pp +++ b/.vagrant-puppet/modules/epel/manifests/init.pp @@ -15,10 +15,10 @@ class epel { yumrepo { 'epel': mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=${::architecture}", - enabled => '1', - gpgcheck => '1', - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6', - descr => "Extra Packages for Enterprise Linux 6 - ${::architecture}" + enabled => '1', + gpgcheck => '1', + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6', + descr => "Extra Packages for Enterprise Linux 6 - ${::architecture}" } file { "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6": diff --git a/.vagrant-puppet/modules/icinga-classicui/manifests/init.pp b/.vagrant-puppet/modules/icinga-classicui/manifests/init.pp index 8efcccd70..b25d5c995 100644 --- a/.vagrant-puppet/modules/icinga-classicui/manifests/init.pp +++ b/.vagrant-puppet/modules/icinga-classicui/manifests/init.pp @@ -12,7 +12,7 @@ class icinga-classicui { package { 'icinga-gui': ensure => installed, - alias => 'icinga-gui' + alias => 'icinga-gui' } # runtime users @@ -32,11 +32,11 @@ class icinga-classicui { } exec { 'enable-icinga2-features': - path => '/bin:/usr/bin:/sbin:/usr/sbin', + path => '/bin:/usr/bin:/sbin:/usr/sbin', command => 'i2enfeature statusdat; \ i2enfeature compat-log; \ i2enfeature command;', require => [ Package['icinga2'] ], - notify => Service['icinga2'] + notify => Service['icinga2'] } } diff --git a/.vagrant-puppet/modules/icinga-rpm-snapshot/manifests/init.pp b/.vagrant-puppet/modules/icinga-rpm-snapshot/manifests/init.pp index 442874548..e2ba168ca 100644 --- a/.vagrant-puppet/modules/icinga-rpm-snapshot/manifests/init.pp +++ b/.vagrant-puppet/modules/icinga-rpm-snapshot/manifests/init.pp @@ -16,11 +16,11 @@ class icinga-rpm-snapshot { yumrepo { 'icinga-rpm-snapshot': mirrorlist => "http://packages.icinga.org/epel/6/snapshot/ICINGA-snapshot.repo", # baseurl is required, otherwise mirrorlist errors by yum - baseurl => "http://packages.icinga.org/epel/6/snapshot/", - enabled => '1', - gpgcheck => '1', - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ICINGA', - descr => "Icinga Snapshot Packages for Enterprise Linux 6 - ${::architecture}" + baseurl => "http://packages.icinga.org/epel/6/snapshot/", + enabled => '1', + gpgcheck => '1', + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ICINGA', + descr => "Icinga Snapshot Packages for Enterprise Linux 6 - ${::architecture}" } file { "/etc/pki/rpm-gpg/RPM-GPG-KEY-ICINGA": diff --git a/.vagrant-puppet/modules/icinga-web/manifests/init.pp b/.vagrant-puppet/modules/icinga-web/manifests/init.pp index 4b4a13106..5f231cbda 100644 --- a/.vagrant-puppet/modules/icinga-web/manifests/init.pp +++ b/.vagrant-puppet/modules/icinga-web/manifests/init.pp @@ -8,12 +8,12 @@ class icinga-web { package { 'icinga-web': ensure => installed, require => Class['icinga-rpm-snapshot'], - notify => Service['apache'] + notify => Service['apache'] } exec { 'create-mysql-icinga-web-db': - path => '/bin:/usr/bin:/sbin:/usr/sbin', - unless => 'mysql -uicinga_web -picinga_web icinga_web', + path => '/bin:/usr/bin:/sbin:/usr/sbin', + unless => 'mysql -uicinga_web -picinga_web icinga_web', command => 'mysql -uroot -e "CREATE DATABASE icinga_web; \ GRANT ALL ON icinga_web.* TO icinga_web@localhost \ IDENTIFIED BY \'icinga_web\';"', @@ -21,8 +21,8 @@ class icinga-web { } exec { 'populate-icinga-web-mysql-db': - path => '/bin:/usr/bin:/sbin:/usr/sbin', - unless => 'mysql -uicinga_web -picinga_web icinga_web -e "SELECT * FROM nsm_user;" &> /dev/null', + path => '/bin:/usr/bin:/sbin:/usr/sbin', + unless => 'mysql -uicinga_web -picinga_web icinga_web -e "SELECT * FROM nsm_user;" &> /dev/null', command => 'mysql -uicinga_web -picinga_web icinga_web < /usr/share/icinga-web/etc/schema/mysql.sql', require => [ Package['icinga-web'], Exec['create-mysql-icinga-web-db'] ] } diff --git a/.vagrant-puppet/modules/icinga2/manifests/init.pp b/.vagrant-puppet/modules/icinga2/manifests/init.pp index a8ac7b804..d6f6639f4 100644 --- a/.vagrant-puppet/modules/icinga2/manifests/init.pp +++ b/.vagrant-puppet/modules/icinga2/manifests/init.pp @@ -4,7 +4,7 @@ class icinga2 { package { 'icinga2': ensure => installed, require => Class['icinga-rpm-snapshot'], - alias => 'icinga2' + alias => 'icinga2' } package { 'icinga2-doc': @@ -14,9 +14,10 @@ class icinga2 { } service { 'icinga2': - enable => true, - ensure => running, - alias => 'icinga2', + enable => true, + ensure => running, + hasrestart => true, + alias => 'icinga2', require => Package['icinga2'] } @@ -36,21 +37,21 @@ class icinga2-ido-mysql { # icinga 2 IDO config file { '/etc/icinga2/features-available/ido-mysql.conf': - source => 'puppet:////vagrant/.vagrant-puppet/files/etc/icinga2/features-available/ido-mysql.conf', + source => 'puppet:////vagrant/.vagrant-puppet/files/etc/icinga2/features-available/ido-mysql.conf', require => Package['icinga2'], - notify => Service['icinga2'] + notify => Service['icinga2'] } exec { 'enable-icinga2-ido-mysql': - path => '/bin:/usr/bin:/sbin:/usr/sbin', + path => '/bin:/usr/bin:/sbin:/usr/sbin', command => 'i2enfeature ido-mysql;', require => [ Package['icinga2'], Exec['populate-icinga2-ido-mysql-db'] ], - notify => Service['icinga2'] + notify => Service['icinga2'] } exec { 'create-mysql-icinga2-ido-db': - path => '/bin:/usr/bin:/sbin:/usr/sbin', - unless => 'mysql -uicinga -picinga icinga', + path => '/bin:/usr/bin:/sbin:/usr/sbin', + unless => 'mysql -uicinga -picinga icinga', command => 'mysql -uroot -e "CREATE DATABASE icinga; \ GRANT ALL ON icinga.* TO icinga@localhost \ IDENTIFIED BY \'icinga\';"', @@ -59,8 +60,8 @@ class icinga2-ido-mysql { # populate icinga2-ido-mysql db exec { 'populate-icinga2-ido-mysql-db': - path => '/bin:/usr/bin:/sbin:/usr/sbin', - unless => 'mysql -uicinga -picinga icinga -e "SELECT * FROM icinga_dbversion;" &> /dev/null', + path => '/bin:/usr/bin:/sbin:/usr/sbin', + unless => 'mysql -uicinga -picinga icinga -e "SELECT * FROM icinga_dbversion;" &> /dev/null', command => 'mysql -uicinga -picinga icinga < /usr/share/doc/icinga2-ido-mysql-$(rpm -q icinga2-ido-mysql | cut -d\'-\' -f4)/schema/mysql.sql', require => [ Package['icinga2-ido-mysql'], Exec['create-mysql-icinga2-ido-db'] ] } @@ -70,7 +71,7 @@ class icinga2-ido-mysql { # include icinga-rpm-snapshot # # package { 'icinga2-ido-pgsql': -# ensure => installed, +# ensure => installed, # require => Class['icinga-rpm-snapshot'], # alias = 'icinga2-ido-pgsql' # } @@ -84,7 +85,7 @@ class icinga2-ido-mysql { # } # # exec { 'populate-icinga2-ido-pgsql-db': -# unless => 'psql -U icinga -d icinga -c "SELECT * FROM icinga_dbversion;" &> /dev/null', +# unless => 'psql -U icinga -d icinga -c "SELECT * FROM icinga_dbversion;" &> /dev/null', # command => 'sudo -u postgres psql -U icinga -d icinga < /usr/share/doc/icinga2-ido-pgsql-$(rpm -q icinga2-ido-mysql | cut -d\'-\' -f4)/schema/pgsql.sql', # require => [ Package['icinga2-ido-pgsql'], Exec['create-pgsql-icinga2-ido-db'] ] # } diff --git a/.vagrant-puppet/modules/mysql/manifests/init.pp b/.vagrant-puppet/modules/mysql/manifests/init.pp index 0f5837a68..07a665d10 100644 --- a/.vagrant-puppet/modules/mysql/manifests/init.pp +++ b/.vagrant-puppet/modules/mysql/manifests/init.pp @@ -24,14 +24,14 @@ class mysql { } service { 'mysqld': - enable => true, - ensure => running, + enable => true, + ensure => running, require => Package['mysql-server'] } file { '/etc/my.cnf': content => template('mysql/my.cnf.erb'), require => Package['mysql-server'], - notify => Service['mysqld'] + notify => Service['mysqld'] } } diff --git a/.vagrant-puppet/modules/pgsql/manifests/init.pp b/.vagrant-puppet/modules/pgsql/manifests/init.pp index 36e12bb11..86b371ea7 100644 --- a/.vagrant-puppet/modules/pgsql/manifests/init.pp +++ b/.vagrant-puppet/modules/pgsql/manifests/init.pp @@ -1,7 +1,7 @@ # Class: pgsql # # This class installs the postgresql server and client software. -# Further it configures pg_hba.conf to trus the local icinga user. +# Further it configures pg_hba.conf to trust the local icinga user. # # Parameters: # @@ -31,13 +31,13 @@ class pgsql { } service { 'postgresql': - ensure => running, + ensure => running, require => [Package['postgresql-server'], Exec['initdb']] } file { '/var/lib/pgsql/data/pg_hba.conf': content => template('pgsql/pg_hba.conf.erb'), require => [Package['postgresql-server'], Exec['initdb']], - notify => Service['postgresql'] + notify => Service['postgresql'] } } diff --git a/.vagrant-puppet/modules/php/manifests/extension.pp b/.vagrant-puppet/modules/php/manifests/extension.pp index 23cfe6029..7a0828251 100644 --- a/.vagrant-puppet/modules/php/manifests/extension.pp +++ b/.vagrant-puppet/modules/php/manifests/extension.pp @@ -27,8 +27,8 @@ define php::extension( } package { $name: - ensure => $ensure, + ensure => $ensure, require => $require_, - notify => Service['apache'] + notify => Service['apache'] } } diff --git a/.vagrant-puppet/modules/php/manifests/init.pp b/.vagrant-puppet/modules/php/manifests/init.pp index 1a8e31746..97313208a 100644 --- a/.vagrant-puppet/modules/php/manifests/init.pp +++ b/.vagrant-puppet/modules/php/manifests/init.pp @@ -19,20 +19,20 @@ class php { include apache package { 'php': - ensure => installed, + ensure => installed, require => Package['apache'], - notify => Service['apache'] + notify => Service['apache'] } file { '/etc/php.d/error_reporting.ini': content => template('php/error_reporting.ini.erb'), require => Package['php'], - notify => Service['apache'] + notify => Service['apache'] } file { '/etc/php.d/xdebug_settings.ini': content => template('php/xdebug_settings.ini.erb'), require => Package['php'], - notify => Service['apache'] + notify => Service['apache'] } } diff --git a/.vagrant-puppet/modules/wget/manifests/init.pp b/.vagrant-puppet/modules/wget/manifests/init.pp index 560e10b2f..47c5ef58b 100644 --- a/.vagrant-puppet/modules/wget/manifests/init.pp +++ b/.vagrant-puppet/modules/wget/manifests/init.pp @@ -13,8 +13,7 @@ # include wget # class wget { - package { 'wget': - ensure => installed, + ensure => installed, } }