56 lines
1.5 KiB
Puppet
56 lines
1.5 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),
|
|
notify => Service[$proxmox::hypervisor::vz_service_name],
|
|
}
|
|
|
|
}
|
|
|
|
if $proxmox::hypervisor::labs_firewall_rule == true {
|
|
|
|
firewall { '100 accept proxmox':
|
|
proto => 'tcp',
|
|
action => 'accept',
|
|
port => ['8006', '5900']
|
|
}
|
|
|
|
}
|
|
|
|
|
|
} # Private class: proxmox::hypervisor::config
|