Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

How do I use the generate function?

$
0
0
I am new to puppet. I have a situation where I have to put a file under particular user's home directory on all servers. I know the user's UID, the home directory varies between the server (i.e. it is historic). I am trying to accomplish this by using a following puppet code. $myhome_dir = generate("/bin/bash", "-c", "/bin/grep 666 /etc/passwd | /bin/grep -i abc | /bin/awk -F':' '{print \$6}'") But when I call, it is throwing the following errors Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, Generators can only contain alphanumerics, file separators, and dashes at ... Could someone help me to figure out what is causing this error or what I am doing wrong in my puppet code? My advanced thanks to all. Thanx, Sam

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>