proxmox/manifests/hypervisor/config.pp
Gardouille 1a593c678f * Manage the main OpenVZ's configuration file (/etc/vz/vz.conf).
* The network management for an OpenVZ CT now works for all Debian family and not only Debian >=7.
2015-02-03 15:47:05 +01:00

55 lines
1.4 KiB
Puppet

# == Class: proxmox::hypervisor::config
#
# Some tiny configurations for Proxmox
#
class proxmox::hypervisor::config {
File {
owner => root,
group => root,
mode => 644,
}
Exec {
path => [ '/bin', '/sbin', '/usr/bin', '/usr/sbin' ],
logoutput => 'on_failure',
}
if $::is_proxmox == 'true' {
# Pveproxy access control list
file { "${proxmox::hypervisor::pveproxy_default_path}":
ensure => present,
content => template("${proxmox::hypervisor::pveproxy_default_content}"),
notify => Service["${proxmox::hypervisor::pveproxy_service_name}"],
}
->
# Remove the Subscription message
exec { 'remove_subscription_message':
command => 'rm -f /usr/share/pve-manager/ext4/pvemanagerlib.js.bak; sed -i".bak" -r -e "s/if \(data.status !== \'Active\'\) \{/if (false) {/" /usr/share/pve-manager/ext4/pvemanagerlib.js',
onlyif => 'grep "if (data.status !== \'Active\') {" /usr/share/pve-manager/ext4/pvemanagerlib.js',
}
## OpenVZ configuration
file { "${proxmox::hypervisor::vz_config_file_path}":
ensure => present,
content => template("${proxmox::hypervisor::vz_config_file_tpl}"),
}
}
if $proxmox::hypervisor::labs_firewall_rule == true {
firewall { '100 accept proxmox':
proto => 'tcp',
action => 'accept',
port => ['8006', '5900']
}
}
} # Private class: proxmox::hypervisor::config