Rachel Andrew
2013-Jun-12 10:25 UTC
[Puppet Users] Executing a script after creating vhosts with create_resources
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.
Brian Lalor
2013-Jun-12 10:29 UTC
Re: [Puppet Users] Executing a script after creating vhosts with create_resources
On Jun 12, 2013, at 6:25 AM, Rachel Andrew <rachelandrewuk@gmail.com> 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
2013-Jun-14 10:05 UTC
Re: [Puppet Users] Executing a script after creating vhosts with create_resources
On 12 Jun 2013, at 11:29, Brian Lalor <blalor@bravo5.org> 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.
Maybe Matching Threads
- Using single hiera hash for two create_resources, and mounting filesystems
- puppetlabs/apt and apt::ppa
- Staging content from modules for temporary use by resources
- Hiera Automatic Parameter Lookup Question
- Older versions of packages disappearing from yum repos