# Suppressing ansible logging for a specific action

**URL:** <https://forum.ansible.com/t/suppressing-ansible-logging-for-a-specific-action/15852>\
**Category:** Ansible Project\
**Created:** [August 4, 2014, 4:21pm UTC](https://forum.ansible.com/t/suppressing-ansible-logging-for-a-specific-action/15852 "2014-08-04T16:21:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Ray](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@Mike\_Ray](https://forum.ansible.com/u/Mike_Ray)\
**Post date:** [August 4, 2014, 4:21pm UTC](https://forum.ansible.com/t/suppressing-ansible-logging-for-a-specific-action/15852/1 "2014-08-04T16:21:22Z")

</div>

Ansible’s logging to the system log is pretty sweet.

However, there are occasions when I’d like to repress it for security concerns.

Specifically, when using the file module and the contents flag, whatever “contents” is set to, will show up in the syslog in plain text.

For example, when copying an ssl private key to a machine, you’d see:

Aug 4 10:55:22 HOST ansible-file: Invoked with src=tmp6Ezoy8 directory\_mode=None force=False remote\_src=None dest=/etc/apache2/ssl/wildcard.xes-mad.com.key selevel=None serole=None seuser=None recurse=False delimiter=None group=root content=-----BEGIN RSA PRIVATE KEY-----#012manually#012hidden#012for#012demonstration#012purposes#012-----END RSA PRIVATE KEY-----#012 state=None original\_basename=tmp6Ezoy8 diff\_pee

So having another flag for either this module specifically or for modules in general to suppress syslog output would be great.

The alternative is to write a temporary file and copy that over. This is not excessively unreasonable, but also just not my first choice.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [August 4, 2014, 5:22pm UTC](https://forum.ansible.com/t/suppressing-ansible-logging-for-a-specific-action/15852/2 "2014-08-04T17:22:08Z")

</div>

This is the “no\_log: True” feature already a part of Ansible.

- shell: command # or any other module usage  
no\_log: True

---

<div class="post-metadata">

**Author:** ![Mike\_Ray](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@Mike\_Ray](https://forum.ansible.com/u/Mike_Ray)\
**Post date:** [August 4, 2014, 5:26pm UTC](https://forum.ansible.com/t/suppressing-ansible-logging-for-a-specific-action/15852/3 "2014-08-04T17:26:02Z")

</div>

This is exactly what I was looking for; sorry, I didn’t see it on my own!

Thanks,
