# Ansible target not logging to syslog

**URL:** <https://forum.ansible.com/t/ansible-target-not-logging-to-syslog/22032>\
**Category:** Ansible Project\
**Created:** [July 15, 2016, 8:44pm UTC](https://forum.ansible.com/t/ansible-target-not-logging-to-syslog/22032 "2016-07-15T20:44:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ed\_S](https://avatars.discourse-cdn.com/v4/letter/e/bbe5ce/32.png) [@Ed\_S](https://forum.ansible.com/u/Ed_S)\
**Post date:** [July 15, 2016, 8:44pm UTC](https://forum.ansible.com/t/ansible-target-not-logging-to-syslog/22032/1 "2016-07-15T20:44:17Z")

</div>

Hello,  
I’m running ansible 2.1.0.0 and when running a playbook against a target system(machine B), there are no messages logged to syslog on the target machine(machine b) during the run. Are there settings necessary to get the modules and options logged to syslog on the target system(machine b)?

If I add log\_path=/tmp/ansible.log I get a list of modules and options logged to that file on the manager system(machine A), but still nothing on the target machine (machine b).

Thanks,  
Ed

My current setup looks like this:

Machine A - Manager system. OS is debian with Ansible 2.1 installed from packages. This is where I’m running Ansible  
Machine B - Target system. OS is RedHat 7.

Ansible.cfg

$ cat ansible.cfg  
[defaults]  
roles\_path=roles/internal:roles/external  
vault\_password\_file=vpass  
nocows=1  
ask\_sudo\_pass=True  
ansible\_managed = Ansible managed: {file}

Inventory file

$ cat inventory/test  
[test]  
machine-b

Test Playbook

$ cat plays/test.yml

---

<div class="post-metadata">

**Author:** ![Ed\_S](https://avatars.discourse-cdn.com/v4/letter/e/bbe5ce/32.png) [@Ed\_S](https://forum.ansible.com/u/Ed_S)\
**Post date:** [July 20, 2016, 4:46am UTC](https://forum.ansible.com/t/ansible-target-not-logging-to-syslog/22032/2 "2016-07-20T04:46:51Z")

</div>

So the change that caused the module and options to stop being logged turns out to be the addition of a verbosity check.  
[https://github.com/ansible/ansible/commit/a56c0bc27b07356c3639c0ac39805d4e5dd91171?diff=unified](https://github.com/ansible/ansible/commit/a56c0bc27b07356c3639c0ac39805d4e5dd91171?diff=unified)

Anyone know why this change was made? The commit message doesn’t really make sense to me.  
Or if there’s a way to now set the verbosity to 3 via the config file?  
Or a way to set the verbosity to 3 and not show the full ssh commands on the manager system?

I ask because we’ve got a requirement that any automated configuration management system do at least basic logging on the target system so that changes can be referenced locally.

Thanks,  
Ed

---

<div class="post-metadata">

**Author:** ![Danny\_Kimsey](https://avatars.discourse-cdn.com/v4/letter/d/c5a1d2/32.png) [@Danny\_Kimsey](https://forum.ansible.com/u/Danny_Kimsey)\
**Post date:** [August 2, 2016, 7:33pm UTC](https://forum.ansible.com/t/ansible-target-not-logging-to-syslog/22032/3 "2016-08-02T19:33:53Z")

</div>

We also noticed this change in behavior, we are accustomed to seeing ansible logs in the target’s syslog. Is this a regression in v2.1.0.0?

---

<div class="post-metadata">

**Author:** ![mw1](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@mw1](https://forum.ansible.com/u/mw1)\
**Post date:** [September 13, 2016, 3:33pm UTC](https://forum.ansible.com/t/ansible-target-not-logging-to-syslog/22032/4 "2016-09-13T15:33:28Z")

</div>

yup, -vvv would force logging on target:

-v, --verbose verbose mode (-vvv for more, -vvvv to enable connection debugging)

---

<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 13, 2016, 5:28pm UTC](https://forum.ansible.com/t/ansible-target-not-logging-to-syslog/22032/5 "2016-09-13T17:28:54Z")

</div>

The -v option ONLY affects the output you see on the controller. You can set debug in ansible.cfg or ANSIBLE\_DEBUG=1 in your environment before running ansible to force some logging on the module side. This mostly affects any commands you shell out for, be mindful that not all modules shell out nor does this account for every action in those that do.

---

<div class="post-metadata">

**Author:** ![Andy\_Freeland](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@Andy\_Freeland](https://forum.ansible.com/u/Andy_Freeland)\
**Post date:** [October 26, 2016, 1:38am UTC](https://forum.ansible.com/t/ansible-target-not-logging-to-syslog/22032/6 "2016-10-26T01:38:14Z")

</div>

According to the docs ([http://docs.ansible.com/ansible/intro\_configuration.html#log-path](http://docs.ansible.com/ansible/intro_configuration.html#log-path)), if `log_path` is not set, Ansible will “record module arguments called to the syslog of managed machines”. Shouldn’t that still be happening?
