Can I use Puppet to find out what nodes do not have VMware tools installed?
I have 100 servers with RHEL that I would like to run VMware tools. I have written a Puppet-module that can install VMware tools, just using package {}:
package { 'vmware-tools-esx-nox':
ensure => installed,
}
It would be nice to have a list of servers that do not have the vmware-tools package installed. How can Puppet help me find out what servers do not have VMware Tools installed?
If you have applied that module to all nodes, then the answer should be 'none'. The puppetmaster reporting will tell you as each server is brought into compliance.
The vSphere client will tell you which VMs have vmware tools installed NOW though.
Here's a sample in PowerShell (using VMWare's PowerCLI), listing VMs having no (or no current) tools installed:
get-VM | Get-View | `
? { $_.Guest.ToolsStatus -match "toolsNotInstalled" -or `
$_.Guest.ToolsVersionStatus -ne "guestToolsCurrent" } | `
select Name, `
@{Name="Status"; Expression={$_.Guest.ToolsStatus}}, `
@{Name="Version"; Expression={$_.Guest.ToolsVersionStatus}} | `
format-table