# Bypassing no\_log for a specific output (dumps of zabbix modules)

**URL:** <https://forum.ansible.com/t/bypassing-no-log-for-a-specific-output-dumps-of-zabbix-modules/31007>\
**Category:** Ansible Developer\
**Created:** [August 9, 2019, 2:13pm UTC](https://forum.ansible.com/t/bypassing-no-log-for-a-specific-output-dumps-of-zabbix-modules/31007 "2019-08-09T14:13:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dusan\_Matejka](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@Dusan\_Matejka](https://forum.ansible.com/u/Dusan_Matejka)\
**Post date:** [August 9, 2019, 2:13pm UTC](https://forum.ansible.com/t/bypassing-no-log-for-a-specific-output-dumps-of-zabbix-modules/31007/1 "2019-08-09T14:13:21Z")

</div>

Hi,

I’ve been searching for ways to bypass no\_log option for specific module output, but with no luck so far. To my understanding, providing no\_log for at least one argument in argument\_spec makes every module output containing value of such argument to be altered.

This makes trouble for people that are testing zabbix modules and/or are too lazy to change its default Admin password → “zabbix”. This is what happens when missing dependency error is thrown (it is only a cosmetic issue):

`

```auto
fatal: [zbx-dev-node002]: FAILED! => changed=false
  msg: 'Missing required ********-api module (check docs or install with: pip install********-api)'

```

`

But it gets worse when some content is returned by a module and there is a word ‘zabbix’ present in it. For example, dumping zabbix template into string:

`

```auto
- hosts: localhost
  tasks:  
    - name: test export
      zabbix_template:
        server_url: http://127.0.0.1/zabbix
        login_user: admin
        login_password: zabbix
        template_name: "Template OS Linux"
        state: dump
        dump_format: xml

```

`

With the following result:

`

```auto
<?xml version="1.0" ?>
< ******** _export>
    <version>4.2</version>

...

</ ******** _export>

```

`

Full problem is described in [this issue comment](https://github.com/ansible/ansible/issues/39220#issuecomment-511137442) and followed by my response, which is explaining why it is probably happening → no\_log=True. This issue doesn’t seem to occur when user dumps template into JSON, I believe because module returns dump in an actual JSON format and not as a string (this is unfortunately not doable with XML output).

Is there any other way than describing this behaviour in module documentation? Any help would be greatly appreciated,  
Dusan

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [August 14, 2019, 12:55pm UTC](https://forum.ansible.com/t/bypassing-no-log-for-a-specific-output-dumps-of-zabbix-modules/31007/2 "2019-08-14T12:55:11Z")

</div>

if no\_log could be bypassed and runtime, it would trigger a CVE ... so  
the way to test the modules is to disable no\_log in the module code  
itself.

---

<div class="post-metadata">

**Author:** ![Dusan\_Matejka](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@Dusan\_Matejka](https://forum.ansible.com/u/Dusan_Matejka)\
**Post date:** [August 15, 2019, 12:41pm UTC](https://forum.ansible.com/t/bypassing-no-log-for-a-specific-output-dumps-of-zabbix-modules/31007/3 "2019-08-15T12:41:36Z")

</div>

Thanks for replying, I guess I will add` ``notes:` section to zabbix documentation fragment stating that using default Admin password is not recommended and to expect weird output.  
``  
`

`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [August 27, 2019, 2:18pm UTC](https://forum.ansible.com/t/bypassing-no-log-for-a-specific-output-dumps-of-zabbix-modules/31007/4 "2019-08-27T14:18:38Z")

</div>

i don't think that is exclusive to zabbix and those using 'admin' as a  
password deserve 'some weirdness' imho.
