]> granicus.if.org Git - icinga2/commitdiff
Clean up the Puppet files.
authorGunnar Beutner <gunnar.beutner@netways.de>
Tue, 15 Oct 2013 08:12:30 +0000 (10:12 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Tue, 15 Oct 2013 08:12:30 +0000 (10:12 +0200)
13 files changed:
.vagrant-puppet/manifests/default.pp
.vagrant-puppet/modules/apache/manifests/init.pp
.vagrant-puppet/modules/cpan/manifests/init.pp
.vagrant-puppet/modules/epel/manifests/init.pp
.vagrant-puppet/modules/icinga-classicui/manifests/init.pp
.vagrant-puppet/modules/icinga-rpm-snapshot/manifests/init.pp
.vagrant-puppet/modules/icinga-web/manifests/init.pp
.vagrant-puppet/modules/icinga2/manifests/init.pp
.vagrant-puppet/modules/mysql/manifests/init.pp
.vagrant-puppet/modules/pgsql/manifests/init.pp
.vagrant-puppet/modules/php/manifests/extension.pp
.vagrant-puppet/modules/php/manifests/init.pp
.vagrant-puppet/modules/wget/manifests/init.pp

index c902aca991c290061eff8bd3207b30078e7f50c4..5a663c48b5d1e3bf455b4d2db5cb0f73f36132d6 100644 (file)
@@ -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
 }
index b5e871945b992dc2fea869f7c24a32af04ddd58a..b3c21449adabb736dfef9dfb6e4135c075eb4494 100644 (file)
@@ -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'] ]
   }
 }
index 9cbdaf8b0e68d786b84ff499a28af57426776a7e..075fd72b9a372dc558ea9403ec3760b02ff2e848 100644 (file)
@@ -31,7 +31,7 @@ define cpan(
   }
 
   file { [ '/root/.cpan/', '/root/.cpan/CPAN/' ]:
-    ensure  => directory
+    ensure => directory
   }
 
   file { '/root/.cpan/CPAN/MyConfig.pm':
index 69a45c1563ab7a95c6d9b2151cc8464da31d7fd3..c56f8310df47fc1b1d34c650d2216d166d674c55 100644 (file)
 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":
index 8efcccd702adc4905c988d197b5939a139ee2306..b25d5c995f81ca930898d083afd7ef354f782a04 100644 (file)
@@ -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']
   }
 }
index 442874548e590ecc04796439594c450f5b746d68..e2ba168ca520c6e2563785c3285f6af6ed4d7248 100644 (file)
@@ -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":
index 4b4a1310628180cd5c0bf46efd2775e92262877f..5f231cbdac93506d1d75b38b94dc16a188c440ba 100644 (file)
@@ -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'] ]
   }
index a8ac7b804ca2561c60df5c914b702eae5de68816..d6f6639f47f8ef5c3fecc97f362552836c47d15e 100644 (file)
@@ -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'] ]
 #  }
index 0f5837a68d833fcd2f3d5215d5f59d0044ebc04a..07a665d10fd485c7e2ab9c3abc7e3db069046b1c 100644 (file)
@@ -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']
   }
 }
index 36e12bb1186a5255f1717269f0fce44f7d7478a8..86b371ea7c5e18e0a6e977a997b0c4e873a0aaf2 100644 (file)
@@ -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']
   }
 }
index 23cfe6029e172f3122a1ba47cfd1146ba70d0308..7a0828251ea02025635519cdf90ec9bcf2771fc1 100644 (file)
@@ -27,8 +27,8 @@ define php::extension(
   }
 
   package { $name:
-    ensure  => $ensure,
+    ensure => $ensure,
     require => $require_,
-    notify  => Service['apache']
+    notify => Service['apache']
   }
 }
index 1a8e317468b66f26cfb98f2edc24c56a1c43b919..97313208a71f3ebcff008cc02ef9b50d32f6fd73 100644 (file)
@@ -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']
   }
 }
index 560e10b2ff6d3e20750f9bd9b074d339989fc556..47c5ef58bb74ebb672a783fbb145c74cec68b6cd 100644 (file)
@@ -13,8 +13,7 @@
 #   include wget
 #
 class wget {
-
   package { 'wget':
-    ensure  => installed,
+    ensure => installed,
   }
 }