r10k postrun + Puppetfile

286 views
Skip to first unread message

Lupin Deterd

unread,
Feb 9, 2016, 12:32:17 AM2/9/16
to Puppet Users
Hi,

 I have two questions that all related to r10k, this  could be trivial but I can't seem to make it work. Basically what I want to achieve is  trigger  a postrun  that will modify/set the permission of /var/lib/hieradata and /etc/puppetlabs/puppet/environment/production/modules both are managed by r10k.

 Currently I have a Shell script that does the permission modify and being invoke  manually. I tried to add that on my postrun config but no luck.


Second question where does 'Puppetfile' should be located? Should it go inside the 'environments' folder that is under git control?


Cheers
Lupin

Cory Stoker

unread,
Feb 20, 2016, 10:31:38 PM2/20/16
to puppet...@googlegroups.com
What does your r10k.yaml look like for the postrun command? What you are trying to do is possible of course.  I have a postrun script that I call that wraps and commands I want to perform post deploy.

Your Puppetfile should be in the environment/<environment> folder.   So like /etc/puppetlabs/code/environments/production/Puppetfile.  On your r10k-control git repo it is in the top level directory, which then r10k will copy into the right location.

HTH,
Cory

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/04f1e7e2-8155-4dca-b103-887302a79384%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lupin Deterd

unread,
Feb 22, 2016, 1:34:25 AM2/22/16
to puppet...@googlegroups.com
Thanks Cory.

My postrun entry is:

postrun: [ "/path_to_path/bash_script"] 

All the script do is to chown & chmod the file/directories and it works if I run it manually.

TIA,

Lupin

--
You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/2B3FtARLnD4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAJNEtxvPQV4FYSSh0Z%2Bob1%2BMPkKdotPrpwDMy67fuYCzR0LqyQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages