proxmox/manifests/hypervisor/config.pp

38 lines
1.0 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',
}
}
} # Private class: proxmox::hypervisor::config