Correct some Puppet-lint warnings.

This commit is contained in:
gardouille 2015-03-18 10:50:03 +01:00
parent 02ce788515
commit ef02caca6e
4 changed files with 10 additions and 7 deletions

View File

@ -9,6 +9,7 @@
##### Changes
* Update README.md.
* Upgrade pve-kernel-3.10.0-7-pve and pve-kernel-2.6.32-37 to the last version.
* Puppet-lint
##### Bugfixes
* (#11) Add a new fact to get a valid netmask for OpenVZ's virtual interfaces (venet).

View File

@ -24,8 +24,8 @@ class proxmox::hypervisor::cluster
}
# Test if this node should be the master or a node
if has_interface_with("ipaddress", "${proxmox::hypervisor::cluster_master_ip}") {
#notify { "${::fqdn} will be the cluster master of ${proxmox::hypervisor::cluster_name}": }
## has_interface_with needs double quoted string for the argument !
if has_interface_with('ipaddress', "${proxmox::hypervisor::cluster_master_ip}") {
# Create the cluster on this node
exec { "Create ${proxmox::hypervisor::cluster_name} cluster on ${proxmox::hypervisor::cluster_master_ip}":
@ -35,7 +35,6 @@ class proxmox::hypervisor::cluster
}
}
else {
#notify { "${::fqdn} will be a cluster node of cluster ${proxmox::hypervisor::cluster_name}": }
# Connect this node to the cluster
exec { "Connect to ${proxmox::hypervisor::cluster_name} cluster":

View File

@ -50,6 +50,7 @@ class proxmox::hypervisor::install {
# Ensure that some recommended packages are present on the system
# come from Proxmox and standard Debian repository
## The variable needs double quote to take the array
if ! defined(Package["${proxmox::hypervisor::rec_pkg_name}"]) {
package { $proxmox::hypervisor::rec_pkg_name:
ensure => $proxmox::hypervisor::ve_pkg_ensure,

View File

@ -11,24 +11,26 @@ class proxmox::vm::openvz {
}
# 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}":
file { $proxmox::vm::vm_interfaces_tail_path:
ensure => present,
content => template("${proxmox::vm::vm_interfaces_tail_content}"),
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}":
file { $proxmox::vm::vm_interfaces_path:
ensure => present,
content => template("${proxmox::vm::vm_interfaces_content}"),
content => template($proxmox::vm::vm_interfaces_content),
}
} # fi