puppet agent --certname testcertname --no-daemonize --onetime --server
server_host_name --verbose
it outputs error like:
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install dnsmasq' returned 1:
Error: Cannot find a valid baseurl for repo: base
Could not retrieve mirrorlist
http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: /Stage[main]/Virtualrouter_agent/Package[dnsmasq]/ensure: change
from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y
install dnsmasq' returned 1: Error: Cannot find a valid baseurl for repo:
base
Could not retrieve mirrorlist
http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
to my surprise, echo $? returns 0 which indicates a success.
why doesn't puppet return 1? my script heavily depends on the return value
to judge if puppet runs successfully.
Is there any dependable way to get the real execution result of puppet
agent?
thank you.
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/-GIkg6P3_04J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.