# no\_log option with ad-hoc commands

**URL:** <https://forum.ansible.com/t/no-log-option-with-ad-hoc-commands/19363>\
**Category:** Ansible Project\
**Created:** [September 26, 2015, 7:55am UTC](https://forum.ansible.com/t/no-log-option-with-ad-hoc-commands/19363 "2015-09-26T07:55:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nadzorov](https://avatars.discourse-cdn.com/v4/letter/n/48db29/32.png) [@nadzorov](https://forum.ansible.com/u/nadzorov)\
**Post date:** [September 26, 2015, 7:55am UTC](https://forum.ansible.com/t/no-log-option-with-ad-hoc-commands/19363/1 "2015-09-26T07:55:45Z")

</div>

Hi, would you so kind to to tell me is it possible to use no\_log option with ad-hoc commands?

I want to prevent logging in /var/log/messages or /var/log/syslog on remote server when I run “ansible test-server -m command -a uptime” for example.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [September 26, 2015, 12:17pm UTC](https://forum.ansible.com/t/no-log-option-with-ad-hoc-commands/19363/2 "2015-09-26T12:17:10Z")

</div>

not currently but this PR will enable a global setting to control this  
(which would also apply to adhoc)  
[https://github.com/ansible/ansible/pull/12528](https://github.com/ansible/ansible/pull/12528)

---

<div class="post-metadata">

**Author:** ![Luca\_Berruti](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@Luca\_Berruti](https://forum.ansible.com/u/Luca_Berruti)\
**Post date:** [September 26, 2015, 7:53pm UTC](https://forum.ansible.com/t/no-log-option-with-ad-hoc-commands/19363/3 "2015-09-26T19:53:24Z")

</div>

See also [https://github.com/ansible/ansible/pull/12140](https://github.com/ansible/ansible/pull/12140)
