Discussion:
[Fab-user] Suppressing Output
Mike Andrewjeski
2014-11-12 21:09:47 UTC
Permalink
Hi List,

I've read through the threads regarding suppressing hostname and am using contextmanager to do so along with using
with hide('running', 'status').

What I'm attempting to accomplish is retrieve json data from puppetdb using curl, and *only* json. The output will be used in other tasks
conditionally based on the content of the json.

Using the two methods mentioned above, I'm able to get json output save for the end of the task where fabric finishes and announces it is done:

Done.
Disconnecting from puppet.somewhere.com... done.

Any thought on how one might suppress this output as well? I can post the task I'm using, if it helps..

thanks and regards

-jeski




Please Note:

The information in this Business Wire e-mail message, and any files transmitted with it, is confidential and may be legally privileged. It is intended only for the use of the individual(s) named above. If you are the intended recipient, be aware that your use of any confidential or personal information may be restricted by state and federal privacy laws. If you, the reader of this message, are not the intended recipient, you are hereby notified that you should not further disseminate, distribute, or forward this e-mail message. If you have received this e-mail in error, please notify the sender and delete the material from any computer.
Alexander Fortin
2014-11-12 21:22:26 UTC
Permalink
Post by Mike Andrewjeski
Hi List,
I've read through the threads regarding suppressing hostname and am using contextmanager
to do so along with using
with hide('running', 'status').
What I'm attempting to accomplish is retrieve json data from puppetdb using curl, and
*only* json. The output will be used in other tasks
conditionally based on the content of the json.
Using the two methods mentioned above, I'm able to get json output save for the end of the
Done.
Disconnecting from puppet.somewhere.com... done.
Any thought on how one might suppress this output as well? I can post the task I'm using,
if it helps..
Hi Mike, 

try to use the —hide=status(,running) parameter when running Fabric, it should be apply globally. 

http://docs.fabfile.org/en/1.10/usage/fab.html#cmdoption--hide 

HTH 

--
Alexander Fortin
http://about.me/alexanderfortin
Mike Andrewjeski
2014-11-12 22:04:53 UTC
Permalink
Thank you Alexander, that does indeed work.

My only question is why if I use: with hide(('running', 'status'):
inside my fabfile does it allow the "Done & Disconnecting" messages to
persist.

thanks again,

-jeski
On 12. November 2014 at 22:10:31, Mike Andrewjeski
Post by Mike Andrewjeski
Hi List,
I've read through the threads regarding suppressing hostname and am
using contextmanager
Post by Mike Andrewjeski
to do so along with using
with hide('running', 'status').
What I'm attempting to accomplish is retrieve json data from puppetdb
using curl, and
Post by Mike Andrewjeski
*only* json. The output will be used in other tasks
conditionally based on the content of the json.
Using the two methods mentioned above, I'm able to get json output
save for the end of the
Post by Mike Andrewjeski
Done.
Disconnecting from puppet.somewhere.com... done.
Any thought on how one might suppress this output as well? I can post
the task I'm using,
Post by Mike Andrewjeski
if it helps..
Hi Mike,

try to use the *hide=status(,running) parameter when running Fabric, it
should be apply globally.

http://docs.fabfile.org/en/1.10/usage/fab.html#cmdoption--hide

HTH

--
Alexander Fortin
http://about.me/alexanderfortin


Please Note:

The information in this Business Wire e-mail message, and any files
transmitted with it, is confidential and may be legally privileged. It
is intended only for the use of the individual(s) named above. If you
are the intended recipient, be aware that your use of any confidential
or personal information may be restricted by state and federal privacy
laws. If you, the reader of this message, are not the intended
recipient, you are hereby notified that you should not further
disseminate, distribute, or forward this e-mail message. If you have
received this e-mail in error, please notify the sender and delete the
material from any computer.
Alexander Fortin
2014-11-12 23:14:17 UTC
Permalink
Thank you Alexander, that does indeed work.
inside my fabfile does it allow the "Done & Disconnecting" messages
to persist.
thanks again,
My understanding is that the decorator will apply to any tasks run inside the defined task, and not for the task itself.
--
Alexander Fortin
http://about.me/alexanderfortin
Mike Andrewjeski
2014-11-13 01:03:20 UTC
Permalink
thanks very much for your help today.
Thank you Alexander, that does indeed work.
inside my fabfile does it allow the "Done & Disconnecting" messages
to persist.
thanks again,
My understanding is that the decorator will apply to any tasks run inside the defined task, and not for the task itself.
--
Alexander Fortin
http://about.me/alexanderfortin


Please Note:

The information in this Business Wire e-mail message, and any files transmitted with it, is confidential and may be legally privileged. It is intended only for the use of the individual(s) named above. If you are the intended recipient, be aware that your use of any confidential or personal information may be restricted by state and federal privacy laws. If you, the reader of this message, are not the intended recipient, you are hereby notified that you should not further disseminate, distribute, or forward this e-mail message. If you have received this e-mail in error, please notify the sender and delete the material from any computer.
Loading...