Ask Your Question
0

pupet agent run make it less verbose

asked 2016-08-25 12:16:15 -0500

Narahari gravatar image

updated 2016-08-25 12:17:36 -0500

Friends:

Here is the output that I see upon a puppet agent run


virtual@cdl-pid-p1-01:~> sudo /opt/puppet/bin/puppet agent --test --environment reconfigure_puppetagent_2_diff_master

Info: Retrieving plugin

Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/pe_build.rb

Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/iptablespersistentversion.rb

Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/ip6tables_version.rb

....... ....

Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/iptables_version.rb

Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/root_home.rb

Info: Caching catalog for cdl-pid-p1-01. Info: Applying configuration version '1472144611'

Notice: UNCONDITIONAL I am inside the pidsteamconfigurator module value of $adpnaraharitest=abc

Notice: /Stage[main]/Pidsteamconfigurator/Notify[testu]/message: defined 'message' as 'UNCONDITIONAL I am inside the pidsteamconfigurator module value of $adpnaraharitest=abc'

Notice: I am inside the define function check value of $adpnaraharitest=abc

Notice: /Stage[main]/Pidsteamconfigurator/Notify[test]/message: defined 'message' as 'I am inside the define function check value of $adpnaraharitest=abc'

Notice: Finished catalog run in 1.23 seconds

virtual@cdl-pid-p1-01:~>


I would like to see is just the output of the Notify's and none of the other stuff.

Any idea how to make this happen ?

-Narahari

edit retag flag offensive close merge delete

Comments

It would be helpful to sort out your issue if you can provide your code snippet. It seems your code is giving so many notices. The default output like loading facters and config version can't be removed. Though the custom facters won't turn up from next run.

rajeevsharma gravatar imagerajeevsharma ( 2016-08-25 15:34:09 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2016-08-29 09:43:18 -0500

scoffland gravatar image

From man puppet agent you can see

 --test Enable  the  most common options used for testing. These are ´onetime´, ´ver‐
          bose´,      ´ignorecache´,      ´no-daemonize´,       ´no-usecacheonfailure´,
          ´detailed-exit-codes´, ´no-splay´, and ´show_diff´.

With this in mind you can run

sudo puppet agent  --onetime --ignorecache --no-daemonize --no-usecacheonfailure --no-splay --environment reconfigure_puppetagent_2_diff_master

This avoids the --verbose -- detailed-exit-codes and the --show_diff options. Play around with adding some of these these back in to get the output you want.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-08-25 12:16:15 -0500

Seen: 69 times

Last updated: Aug 29 '16