proxmox/manifests/vm/openvz.pp

40 lines
1.0 KiB
Puppet

# == Class: proxmox::vm::openvz
#
# Manage OpenVZ virtual machines (CT aka Containers)
#
class proxmox::vm::openvz {
File {
owner => root,
group => root,
mode => 644,
}
# Test if a virtual interface is available
if $::ipaddress_eth0 {
if $::ipaddress_venet0_0 { # Virtual network available too?
# Need to configure eth0 in an interfaces.tail file because
# the main interfaces file is auto-generated by PVE (for venet config)
file { "${proxmox::vm::path_interfaces_tail_vm}":
ensure => present,
content => template("${proxmox::vm::content_interfaces_tail_vm}"),
}
}
else { # Only virtual interface is available
# If eth0 is the only interface, push it's configuration in the standard interfaces file
file { "${proxmox::vm::path_interfaces_vm}":
ensure => present,
content => template("${proxmox::vm::content_interfaces_vm}"),
}
} # fi
} # fi; don't need any additionnal network configuration
} # Private class: proxmox::vm::openvz