FAQ
Hello

I'd love a bit of advice in terms of how I should best go about this.

I am creating a bunch of vhosts, their definitions are stored in json (I'm using heira) that json file will be generated from data held on another server. I'm just using the puppetlabs apache module and create_resources to then generate all the vhosts and their directories etc. I'm then doing the same to create associated mysql databases.

   $sites = hiera_hash('apache_vhosts')
   create_resources('apache::vhost',$sites)
   $db = hiera_hash('mysql_db')
   create_resources('mysql::db',$db)

What I need to know however is when a vhost and db has been created. So I can kick off a PHP script to deploy a bunch of files and call our API to send out emails.

Running with a standard Puppet Master and node server setup. Puppet 3.2.1 on Debian Wheezy.

Thanks!

Rachel



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

Search Discussions

  • Brian Lalor at Jun 12, 2013 at 10:29 am

    On Jun 12, 2013, at 6:25 AM, Rachel Andrew wrote:

    What I need to know however is when a vhost and db has been created. So I can kick off a PHP script to deploy a bunch of files and call our API to send out emails.
    I'm pretty sure you'll have to do a custom define to make that happen, which should play well with create_resources. You could also play with a single notify used by all of the resources that have been created…

    --
    Brian Lalor
    blalor@bravo5.org
    http://github.com/blalor

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Rachel Andrew at Jun 14, 2013 at 10:05 am

    On 12 Jun 2013, at 11:29, Brian Lalor wrote:

    I'm pretty sure you'll have to do a custom define to make that happen, which should play well with create_resources. You could also play with a single notify used by all of the resources that have been created…
    thanks for the pointer, I mostly wanted to make sure I wasn't missing anything obvious. Still pretty new to Puppet.

    Just in case anyone else reads this thread I wound up creating a custom define as a wrapper around vhost and database creation and using that for create_resources. Inside that I just make sure all the things are created before the execute command and it seems to be working nicely :)

    Rachel

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedJun 12, '13 at 10:25a
activeJun 14, '13 at 10:05a
posts3
users2
websitepuppetlabs.com

2 users in discussion

Rachel Andrew: 2 posts Brian Lalor: 1 post

People

Translate

site design / logo © 2022 Grokbase