Vagrant: Create preferences table on database icingaweb for MySQL and PostgreSQL
refs #4549
This commit is contained in:
parent
c7e8add75a
commit
e7db4b84f0
|
@ -348,7 +348,9 @@ exec { 'install php-ZendFramework-Db-Adapter-Pdo-Mysql':
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/etc/motd':
|
file { '/etc/motd':
|
||||||
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/motd'
|
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/motd',
|
||||||
|
user => root,
|
||||||
|
group => root
|
||||||
}
|
}
|
||||||
|
|
||||||
user { 'vagrant':
|
user { 'vagrant':
|
||||||
|
@ -467,18 +469,30 @@ exec { 'create-pgsql-icingaweb-db':
|
||||||
require => Service['postgresql']
|
require => Service['postgresql']
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { 'populate-icingaweb-mysql-db':
|
exec { 'populate-icingaweb-mysql-db-accounts':
|
||||||
unless => 'mysql -uicingaweb -picinga icingaweb -e "SELECT * FROM account;" &> /dev/null',
|
unless => 'mysql -uicingaweb -picinga icingaweb -e "SELECT * FROM account;" &> /dev/null',
|
||||||
command => 'mysql -uicingaweb -picinga icingaweb < /vagrant/etc/schema/users.mysql.sql',
|
command => 'mysql -uicingaweb -picinga icingaweb < /vagrant/etc/schema/users.mysql.sql',
|
||||||
require => [ Exec['create-mysql-icingaweb-db'] ]
|
require => [ Exec['create-mysql-icingaweb-db'] ]
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { 'populate-icingweba-pgsql-db':
|
exec { 'populate-icingweba-pgsql-db-accounts':
|
||||||
unless => 'psql -U icingaweb -d icingaweb -c "SELECT * FROM account;" &> /dev/null',
|
unless => 'psql -U icingaweb -d icingaweb -c "SELECT * FROM account;" &> /dev/null',
|
||||||
command => 'sudo -u postgres psql -U icingaweb -d icingaweb -f /vagrant/etc/schema/users.pgsql.sql',
|
command => 'sudo -u postgres psql -U icingaweb -d icingaweb -f /vagrant/etc/schema/users.pgsql.sql',
|
||||||
require => [ Exec['create-pgsql-icingaweb-db'] ]
|
require => [ Exec['create-pgsql-icingaweb-db'] ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exec { 'populate-icingaweb-mysql-db-preferences':
|
||||||
|
unless => 'mysql -uicingaweb -picinga icingaweb -e "SELECT * FROM preference;" &> /dev/null',
|
||||||
|
command => 'mysql -uicingaweb -picinga icingaweb < /vagrant/etc/schema/preferences.mysql.sql',
|
||||||
|
require => [ Exec['create-mysql-icingaweb-db'] ]
|
||||||
|
}
|
||||||
|
|
||||||
|
exec { 'populate-icingweba-pgsql-db-preferences':
|
||||||
|
unless => 'psql -U icingaweb -d icingaweb -c "SELECT * FROM preference;" &> /dev/null',
|
||||||
|
command => 'sudo -u postgres psql -U icingaweb -d icingaweb -f /vagrant/etc/schema/preferences.pgsql.sql',
|
||||||
|
require => [ Exec['create-pgsql-icingaweb-db'] ]
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Following section creates the Icinga command proxy to /usr/local/icinga-mysql/var/rw/icinga.cmd (which is the
|
# Following section creates the Icinga command proxy to /usr/local/icinga-mysql/var/rw/icinga.cmd (which is the
|
||||||
# config's default path for the Icinga command pipe) in order to send commands to both the MySQL and PostgreSQL instance
|
# config's default path for the Icinga command pipe) in order to send commands to both the MySQL and PostgreSQL instance
|
||||||
|
|
Loading…
Reference in New Issue