Hey folks. I am learning puppet on my own and so far it has been great. But I am having some issues due to lack of experience with puppet.
The following questions may seem specific but they are part of me understanding the overall picture on what to do when encountering similar situations when using puppet.
I am creating via puppet a CentOS yum repo. Apache, createrepo and the directories are created ...and here are my questions.
How would you go about specifying that only the ../centos directory will be ownedb by user and group apache.?
file {["/repo/", "/repo/Centos06", "/repo/Centos06/centos/"]: ensure => directory, require => Package['httpd'], owner => 'apache', group => 'apache', }
After this is done I want to rsync with a Centos web site to get all the RPMs. How would yo go about this? Would you execute the command with "exec"? I tried that and it gave me all kinds of errors, because it gets confused by the multiple single quotes. It just looks ugly.
"/usr/bin/rsync -avrt rsync://mirror.clarkson.edu/centos/ /repo/CentOS6/centos --exclude '2/' --exclude '2.*/' --exclude '3/' --exclude '3.*/' --exclude '4/' --exclude '4.*/' --exclude '5/' --exclude '5.*/' --exclude '6.5/isos/'
Should I put the rsyng command in a shell script and execute the script via puppet? How would puppet know the rsync process finished? or if the script encountered an error?
Thank you :)
[link][9 comments]