# == Class: proxmox::vm::openvz # # Manage OpenVZ virtual machines (CT aka Containers) # class proxmox::vm::openvz { File { owner => root, group => root, mode => 0644, } # Test if a virtual interface is available ## has_interface_with needs double quoted string for the argument ! if has_interface_with("eth0") { ## has_interface_with needs double quoted string for the argument ! if has_interface_with("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::vm_interfaces_tail_path: ensure => present, content => template($proxmox::vm::vm_interfaces_tail_content), } } else { # Only virtual interface is available # If eth0 is the only interface, push it's configuration in the standard interfaces file file { $proxmox::vm::vm_interfaces_path: ensure => present, content => template($proxmox::vm::vm_interfaces_content), } } # fi } # fi; don't need any additionnal network configuration } # Private class: proxmox::vm::openvz