Re: [Puppet Users] See puppet output in stdout when running --no-daemonize inside a bash script

404 views
Skip to first unread message

Juan Sierra Pons

unread,
Jul 18, 2012, 2:29:29 PM7/18/12
to puppet...@googlegroups.com

On Jul 18, 2012 5:30 PM, "Sam Simmons" <s...@samiconductor.com> wrote:
>
> I'm simply trying to run puppet inside a bash script but I'm not seeing any output.
>
> #!/bin/bash
> puppet master --mkusers --autosign --verbose --no-daemonize
>
> Is there an I/O redirection incantation I'm missing?
>
> --
> 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/-/H2aXJn59bRQJ.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Hi,
Add
set -x
in the second line.

This will run you script in verbose mode and see what happen.

Hope it helps

Best regards

Juan

Sam Simmons

unread,
Jul 18, 2012, 9:46:38 PM7/18/12
to puppet...@googlegroups.com
Ah ha! The problem was --autosign is a bit more than just a boolean arg so you have to explicitly say true or false.

#!/bin/bash
puppet master --mkusers --autosign true --verbose --no-daemonize

Using the args I had originally causes it to appear to hang, but you can still get catalogs from it with an agent so it actually just oddly silences output.

Wow, that was a confusing waste of time.

Thanks for the suggestion though!


On Wednesday, July 18, 2012 1:29:29 PM UTC-5, Juan Sierra Pons wrote:

On Jul 18, 2012 5:30 PM, "Sam Simmons" <s...@samiconductor.com> wrote:
>
> I'm simply trying to run puppet inside a bash script but I'm not seeing any output.
>
> #!/bin/bash
> puppet master --mkusers --autosign --verbose --no-daemonize
>
> Is there an I/O redirection incantation I'm missing?
>
> --
> 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/-/H2aXJn59bRQJ.
> To post to this group, send email to puppet...@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.

Sam Simmons

unread,
Jul 18, 2012, 10:01:02 PM7/18/12
to puppet...@googlegroups.com
Oh right, it's just gobbling up the --verbose argument as the auth.conf path. Running it like this:

sudo puppet master --mkusers --verbose --no-daemonize --autosign

Produces the informative error:

Could not parse options: missing argument: --autosign

#derp

Felix Frank

unread,
Jul 20, 2012, 8:05:13 AM7/20/12
to puppet...@googlegroups.com
On 07/19/2012 03:46 AM, Sam Simmons wrote:
> Ah ha! The problem was --autosign
> <http://docs.puppetlabs.com/references/latest/configuration.html#autosign>
> is a bit more than just a boolean arg so you have to explicitly say true
> or false.
>
> #!/bin/bash
> puppet master --mkusers --autosign true --verbose --no-daemonize
>
> Using the args I had originally causes it to appear to hang, but you can
> still get catalogs from it with an agent so it actually just oddly
> silences output.

<insert obvious exclamation about not using autosign ever here> ;-)

Sam Simmons

unread,
Jul 20, 2012, 10:06:46 AM7/20/12
to puppet...@googlegroups.com
Ya ya.

I'm just running it on my home net to init master (--mkusers) and my server (--autosign). Then run master normally after that. Removes a step.
Reply all
Reply to author
Forward
0 new messages