==== proxmox::vm::openvz (#7)
Correct some variables name Use has_interface_with("eth0") instead of $::ipaddress_eth0
This commit is contained in:
parent
f352cac53e
commit
a9c7d2e1aa
|
@ -7,28 +7,28 @@ class proxmox::vm::openvz {
|
||||||
File {
|
File {
|
||||||
owner => root,
|
owner => root,
|
||||||
group => root,
|
group => root,
|
||||||
mode => 644,
|
mode => 0644,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test if a virtual interface is available
|
# 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
|
# Need to configure eth0 in an interfaces.tail file because
|
||||||
# the main interfaces file is auto-generated by PVE (for venet config)
|
# 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,
|
ensure => present,
|
||||||
content => template("${proxmox::vm::content_interfaces_tail_vm}"),
|
content => template("${proxmox::vm::vm_interfaces_tail_content}"),
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else { # Only virtual interface is available
|
else { # Only virtual interface is available
|
||||||
|
|
||||||
# If eth0 is the only interface, push it's configuration in the standard interfaces file
|
# 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,
|
ensure => present,
|
||||||
content => template("${proxmox::vm::content_interfaces_vm}"),
|
content => template("${proxmox::vm::vm_interfaces_content}"),
|
||||||
}
|
}
|
||||||
|
|
||||||
} # fi
|
} # fi
|
||||||
|
|
Loading…
Reference in New Issue