Puppet ESX

Puppet On VMWare

TBC

Supported Versions

TBC

ESX 4.1

OS info

[root@esx4.1 ~]# uname -a
Linux esx4.1 2.6.18-164.ESX #1 Fri Apr 16 14:57:03 PDT 2010 x86_64 x86_64 x86_64 GNU/Linux
[root@esx4.1 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.1 (Tikanga)
[root@esx4.1 ~]# vmware -v
VMware ESX 4.1.0 build-260247
[root@esx4.1 ~]#

You will need to manually download all of the packages.

The following packages need to be installed:
* ruby-1.8.5-24.el5.x86_64.rpm
* ruby-libs-1.8.5-24.el5.x86_64.rpm
* augeas-libs-0.9.0-1.el5.rf.x86_64.rpm
* ruby-augeas-0.4.1-2.el5.rf.x86_64.rpm
* ruby-shadow-1.4.1-2.el5.rf.x86_64.rpm
* libselinux-utils-1.33.4-5.7.el5.x86_64.rpm

The following packages need to be upgraded(rpm -Uvh):
* libselinux-1.33.4-5.7.el5.
* libselinux-python-1.33.4-5.7.el5.x86_64.rpm
* libselinux-ruby-1.33.4-5.7.el5.

Then you should be able to install:
* puppet-2.7.9-1.el5.rf.noarch.rpm
* facter-1.6.4-1.el5.rf.noarch.rpm


My modules are very simple. But one thing that I needed to do with the Package directive, is specify provider => rpm, or you end up with an error because it will try and use pip.

[root@esxtest4 puppet-client-rhel5_x86_64]# puppetd --test
info: Caching catalog for mhesxtest4.mhsl01.mhsl.local
warning: Found multiple default providers for package: pip, rpm; using pip
info: Applying configuration version '1331832651'
err: /Stage[main]/Ntpd/Package[ntp]/ensure: change from absent to present failed: Could not set 'present on ensure: undefined method `pip' for # at /etc/puppet/modules/ntpd/manifests/init.pp:6
notice: /Stage[main]/Ntpd/Service[ntpd]: Dependency Package[ntp] has failures: true
warning: /Stage[main]/Ntpd/Service[ntpd]: Skipping because of failed dependencies
notice: Finished catalog run in 0.12 seconds
[root@esxtest4 puppet-client-rhel5_x86_64]# 

Once I added the provider => rpm to the module:

[root@esxtest4 puppet-client-rhel5_x86_64]# puppetd --test
info: Caching catalog for esxtest4.internal.local
warning: Found multiple default providers for package: rpm, pip; using rpm
info: Applying configuration version '1331833160'
notice: /Stage[main]/Esx-ntpd/Service[ntpd]/ensure: ensure changed 'stopped' to 'running'
notice: Finished catalog run in 0.75 seconds
[root@esxtest4 puppet-client-rhel5_x86_64]# 

And for example sake, here is the working module:

[root@linux151 manifests]# cat init.pp 
class esx-ntpd {

  package { ntp:
    provider => rpm, 
    ensure => installed,
    notify => Service["ntpd"],
  }

  service { ntpd:
    ensure => running,
    enable => true,
   }
}

[root@linux151 manifests]# 

ESXi 4.1

TBC