From a9c7d2e1aa57b226ec3ed10b1f4ba389ff5711e4 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Mon, 26 Jan 2015 12:11:34 +0100 Subject: [PATCH] ==== proxmox::vm::openvz (#7) Correct some variables name Use has_interface_with("eth0") instead of $::ipaddress_eth0 --- manifests/vm/openvz.pp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/manifests/vm/openvz.pp b/manifests/vm/openvz.pp index d3e0685..bc1a03e 100644 --- a/manifests/vm/openvz.pp +++ b/manifests/vm/openvz.pp @@ -7,28 +7,28 @@ class proxmox::vm::openvz { File { owner => root, group => root, - mode => 644, + mode => 0644, } # Test if a virtual interface is available - if $::ipaddress_eth0 { + if has_interface_with("eth0") { - if $::ipaddress_venet0_0 { # Virtual network available too? + if has_interface_with("venet0") { # 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}": + file { "${proxmox::vm::vm_interfaces_tail_path}": ensure => present, - content => template("${proxmox::vm::content_interfaces_tail_vm}"), + 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::path_interfaces_vm}": + file { "${proxmox::vm::vm_interfaces_path}": ensure => present, - content => template("${proxmox::vm::content_interfaces_vm}"), + content => template("${proxmox::vm::vm_interfaces_content}"), } } # fi