I've been working on a puppet module to bootstrap a 0.25.5
puppetmaster based on these instructions:

http://projects.puppetlabs.com/projects/1/wiki/Using_Passenger

There is a point in the installation where you need to start
/etc/init.d/puppetmaster to get it to generate the necessary .pem
files, then stop it to free up the port.  In my mind's eye, the ideal
syntax looks something like this:

        service { "httpd":
            requires => [
                File["/var/lib/puppet/ssl/certs/ca.pem"],
                File["/var/lib/puppet/ssl/certs/$hostname.$domain.pem"],
                ...
            ],
            ...
        }

        exec { "Create pem files":
            command => [
                "/etc/init.d/puppetmaster start",
                "/etc/init.d/puppetmaster stop",
            ],
            creates => [
                File["/var/lib/puppet/ssl/certs/ca.pem"],
                File["/var/lib/puppet/ssl/certs/$hostname.$domain.pem"],
                ...
            ],
            requires => Package["puppet-server"],
        }

In reality, I end up writing something more like this:

        service { "httpd":
            ...
        }

        exec { "Create pem files (start)":
            command => "/etc/init.d/puppetmaster start",
            notify => Exec["Create pem files (stop)"],
            requires => Package["puppet-server"],
            unless => "test -f /var/lib/puppet/ssl/certs/$hostname.$domain.pem":
        }

        exec { "Create pem files (stop)":
            command => "/etc/init.d/puppetmaster stop",
            notify => Service["httpd"],
            refreshonly => true,
            requires => Package["puppet-server"],
        }

Opinions on this hypothetical syntax?

creates => File
command => array
/etc/init.d/puppetmaster restop ;)

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to