mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-24 06:05:01 +02:00
Vagrant: Cleanup.
This commit is contained in:
parent
11b71774b4
commit
616e0f950a
@ -7,7 +7,6 @@ include icinga-rpm-snapshot
|
|||||||
|
|
||||||
Exec { path => '/bin:/usr/bin:/sbin:/usr/sbin' }
|
Exec { path => '/bin:/usr/bin:/sbin:/usr/sbin' }
|
||||||
|
|
||||||
|
|
||||||
exec { 'create-mysql-icinga2-ido-db':
|
exec { 'create-mysql-icinga2-ido-db':
|
||||||
unless => 'mysql -uicinga -picinga icinga',
|
unless => 'mysql -uicinga -picinga icinga',
|
||||||
command => 'mysql -uroot -e "CREATE DATABASE icinga; \
|
command => 'mysql -uroot -e "CREATE DATABASE icinga; \
|
||||||
@ -25,7 +24,6 @@ exec { 'create-mysql-icinga2-ido-db':
|
|||||||
# require => Service['postgresql']
|
# require => Service['postgresql']
|
||||||
#}
|
#}
|
||||||
|
|
||||||
|
|
||||||
php::extension { ['php-mysql']:
|
php::extension { ['php-mysql']:
|
||||||
require => [ Class['mysql'] ]
|
require => [ Class['mysql'] ]
|
||||||
}
|
}
|
||||||
@ -55,24 +53,6 @@ file { '/etc/profile.d/env.sh':
|
|||||||
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/profile.d/env.sh'
|
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/profile.d/env.sh'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
exec { 'install nodejs':
|
|
||||||
command => 'yum -d 0 -e 0 -y --enablerepo=epel install npm',
|
|
||||||
unless => 'rpm -qa | grep ^npm',
|
|
||||||
require => Class['epel']
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# for development only, not rpms
|
|
||||||
$icinga2_dev_packages = [ 'doxygen', 'openssl-devel',
|
|
||||||
'gcc-c++', 'libstdc++-devel',
|
|
||||||
'automake', 'autoconf',
|
|
||||||
'libtool', 'flex', 'bison',
|
|
||||||
'boost-devel', 'boost-program-options',
|
|
||||||
'boost-signals', 'boost-system',
|
|
||||||
'boost-test', 'boost-thread' ]
|
|
||||||
package { $icinga2_dev_packages: ensure => installed }
|
|
||||||
|
|
||||||
# nagios plugins from epel
|
# nagios plugins from epel
|
||||||
package { 'nagios-plugins-all':
|
package { 'nagios-plugins-all':
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
@ -125,6 +105,7 @@ user { 'vagrant':
|
|||||||
service { 'icinga2':
|
service { 'icinga2':
|
||||||
enable => true,
|
enable => true,
|
||||||
ensure => running,
|
ensure => running,
|
||||||
|
hasrestart => true,
|
||||||
require => Package['icinga2']
|
require => Package['icinga2']
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,7 +121,7 @@ file { "/etc/icinga2/features-enabled/*":
|
|||||||
notify => Service['icinga2']
|
notify => Service['icinga2']
|
||||||
}
|
}
|
||||||
|
|
||||||
# provision icinga2-ido-mysql db
|
# populate icinga2-ido-mysql db
|
||||||
exec { 'populate-icinga2-ido-mysql-db':
|
exec { 'populate-icinga2-ido-mysql-db':
|
||||||
unless => 'mysql -uicinga -picinga icinga -e "SELECT * FROM icinga_dbversion;" &> /dev/null',
|
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',
|
command => 'mysql -uicinga -picinga icinga < /usr/share/doc/icinga2-ido-mysql-$(rpm -q icinga2-ido-mysql | cut -d\'-\' -f4)/schema/mysql.sql',
|
||||||
|
3
Vagrantfile
vendored
3
Vagrantfile
vendored
@ -89,8 +89,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||||||
config.vm.provision :puppet do |puppet|
|
config.vm.provision :puppet do |puppet|
|
||||||
puppet.module_path = ".vagrant-puppet/modules"
|
puppet.module_path = ".vagrant-puppet/modules"
|
||||||
puppet.manifests_path = ".vagrant-puppet/manifests"
|
puppet.manifests_path = ".vagrant-puppet/manifests"
|
||||||
# puppet.options = "-v -d"
|
#puppet.options = "--verbose --debug"
|
||||||
puppet.options = "--verbose --debug"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.provision :shell, :path => ".vagrant-puppet/manifests/finalize.sh"
|
config.vm.provision :shell, :path => ".vagrant-puppet/manifests/finalize.sh"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user