==== proxmox::vm::openvz (#7)

Correct some variables name
  Use has_interface_with("eth0") instead of $::ipaddress_eth0
This commit is contained in:
gardouille 2015-01-26 12:11:34 +01:00
parent f352cac53e
commit a9c7d2e1aa
1 changed files with 7 additions and 7 deletions

View File

@ -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