# debug statements trigger security check error "A variable inserted a new parameter into the module args"

**URL:** <https://forum.ansible.com/t/debug-statements-trigger-security-check-error-a-variable-inserted-a-new-parameter-into-the-module-args/16108>\
**Category:** Ansible Project\
**Created:** [September 3, 2014, 5:27pm UTC](https://forum.ansible.com/t/debug-statements-trigger-security-check-error-a-variable-inserted-a-new-parameter-into-the-module-args/16108 "2014-09-03T17:27:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kesten\_Broughton2](https://avatars.discourse-cdn.com/v4/letter/k/ecc23a/32.png) [@Kesten\_Broughton2](https://forum.ansible.com/u/Kesten_Broughton2)\
**Post date:** [September 3, 2014, 5:27pm UTC](https://forum.ansible.com/t/debug-statements-trigger-security-check-error-a-variable-inserted-a-new-parameter-into-the-module-args/16108/1 "2014-09-03T17:27:03Z")

</div>

I’m running into several cases where debug statements trigger the security check error:

A variable inserted a new parameter into the module args. Be sure to quote variables if they contain equal signs (for example: “{{var}}”).

There are a few issues that seem related,

[https://github.com/ansible/ansible/issues/8260](https://github.com/ansible/ansible/issues/8260)

But none of them are my case which simply outputting a registered variable. Interestingly, i seem to be able to debug-access all fields of the registered variable, just not the whole object.

Is there a convention i can follow to avoid this sort of thing?

The offending lines are

- name: Check for attached volumes

shell: “fdisk -l”

register: register\_fdisk

- debug: msg=“{{register\_fdisk.changed}}” # no problem

- debug: msg=“{{register\_fdisk.stdout}}”

- debug: msg=“{{register\_fdisk.keys}}”

- debug: msg=“{{register\_fdisk}}” # only this fails

And out put:

TASK: [hardware | Check for attached volumes] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

\<127.0.0.1\> ESTABLISH CONNECTION FOR USER: vagrant

\<127.0.0.1\> REMOTE\_MODULE command fdisk -l #USE\_SHELL

\<127.0.0.1\> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/Users/kbroughton/.ansible/cp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘Port=2211’, ‘-o’, ‘IdentityFile=“/Users/kbroughton/.vagrant.d/insecure\_private\_key”’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=vagrant’, ‘-o’, ‘ConnectTimeout=10’, ‘127.0.0.1’, “/bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1409764530.2-166440363117817 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1409764530.2-166440363117817 && echo $HOME/.ansible/tmp/ansible-tmp-1409764530.2-166440363117817’”]

\<127.0.0.1\> PUT /var/folders/t2/h22337c12hn279xwd4s9fk7s8\_088c/T/tmpbca0cf TO /home/vagrant/.ansible/tmp/ansible-tmp-1409764530.2-166440363117817/command

\<127.0.0.1\> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/Users/kbroughton/.ansible/cp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘Port=2211’, ‘-o’, ‘IdentityFile=“/Users/kbroughton/.vagrant.d/insecure\_private\_key”’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=vagrant’, ‘-o’, ‘ConnectTimeout=10’, ‘127.0.0.1’, u’/bin/sh -c 'sudo -k && sudo -H -S -p “[sudo via ansible, key=pgapabqrdqjcybxpgqhegcclfoxafxzx] password: " -u root /bin/sh -c '”'“'echo SUDO-SUCCESS-pgapabqrdqjcybxpgqhegcclfoxafxzx; LANG=en\_US.UTF-8 LC\_CTYPE=en\_US.UTF-8 /usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1409764530.2-166440363117817/command; rm -rf /home/vagrant/.ansible/tmp/ansible-tmp-1409764530.2-166440363117817/ \>/dev/null 2\>&1'”'"''']

changed: [allinone-1] =\> {“changed”: true, “cmd”: “fdisk -l”, “delta”: “0:00:00.018536”, “end”: “2014-09-03 17:15:30.573009”, “rc”: 0, “start”: “2014-09-03 17:15:30.554473”, “stderr”: “Disk /dev/sdb doesn’t contain a valid partition table\nDisk /dev/sdc doesn’t contain a valid partition table\nDisk /dev/mapper/vg0-root doesn’t contain a valid partition table\nDisk /dev/mapper/vg0-swap doesn’t contain a valid partition table”, “stdout”: “\nDisk /dev/sda: 44.0 GB, 44040192000 bytes\n255 heads, 63 sectors/track, 5354 cylinders, total 86016000 sectors\nUnits = sectors of 1 \* 512 = 512 bytes\nSector size (logical/physical): 512 bytes / 512 bytes\nI/O size (minimum/optimal): 512 bytes / 512 bytes\nDisk identifier: 0x0007137a\n\n Device Boot Start End Blocks Id System\n/dev/sda1 \* 2048 1757183 877568 83 Linux\n/dev/sda2 1759230 86013951 42127361 5 Extended\n/dev/sda5 1759232 86013951 42127360 8e Linux LVM\n\nDisk /dev/sdb: 1073 MB, 1073741824 bytes\n255 heads, 63 sectors/track, 130 cylinders, total 2097152 sectors\nUnits = sectors of 1 \* 512 = 512 bytes\nSector size (logical/physical): 512 bytes / 512 bytes\nI/O size (minimum/optimal): 512 bytes / 512 bytes\nDisk identifier: 0x00000000\n\n\nDisk /dev/sdc: 10.7 GB, 10737418240 bytes\n255 heads, 63 sectors/track, 1305 cylinders, total 20971520 sectors\nUnits = sectors of 1 \* 512 = 512 bytes\nSector size (logical/physical): 512 bytes / 512 bytes\nI/O size (minimum/optimal): 512 bytes / 512 bytes\nDisk identifier: 0x00000000\n\n\nDisk /dev/mapper/vg0-root: 40.0 GB, 39996882944 bytes\n255 heads, 63 sectors/track, 4862 cylinders, total 78118912 sectors\nUnits = sectors of 1 \* 512 = 512 bytes\nSector size (logical/physical): 512 bytes / 512 bytes\nI/O size (minimum/optimal): 512 bytes / 512 bytes\nDisk identifier: 0x00000000\n\n\nDisk /dev/mapper/vg0-swap: 3137 MB, 3137339392 bytes\n255 heads, 63 sectors/track, 381 cylinders, total 6127616 sectors\nUnits = sectors of 1 \* 512 = 512 bytes\nSector size (logical/physical): 512 bytes / 512 bytes\nI/O size (minimum/optimal): 512 bytes / 512 bytes\nDisk identifier: 0x00000000”, “warnings”: }

TASK: [hardware | debug msg=“{{register\_fdisk.changed}}”] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

\<127.0.0.1\> ESTABLISH CONNECTION FOR USER: vagrant

ok: [allinone-1] =\> {

“msg”: “True”

}

TASK: [hardware | debug msg=“{{register\_fdisk.stdout}}”] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

\<127.0.0.1\> ESTABLISH CONNECTION FOR USER: vagrant

ok: [allinone-1] =\> {

“msg”: “\nDisk /dev/sda: 44.0 GB, 44040192000 bytes\n255 heads, 63 sectors/track, 5354 cylinders, total 86016000 sectors\nUnits = sectors of 1 \* 512 = 512 bytes\nSector size (logical/physical): 512 bytes / 512 bytes\nI/O size (minimum/optimal): 512 bytes / 512 bytes\nDisk identifier: 0x0007137a\n\n Device Boot Start End Blocks Id System\n/dev/sda1 \* 2048 1757183 877568 83 Linux\n/dev/sda2 1759230 86013951 42127361 5 Extended\n/dev/sda5 1759232 86013951 42127360 8e Linux LVM\n\nDisk /dev/sdb: 1073 MB, 1073741824 bytes\n255 heads, 63 sectors/track, 130 cylinders, total 2097152 sectors\nUnits = sectors of 1 \* 512 = 512 bytes\nSector size (logical/physical): 512 bytes / 512 bytes\nI/O size (minimum/optimal): 512 bytes / 512 bytes\nDisk identifier: 0x00000000\n\n\nDisk /dev/sdc: 10.7 GB, 10737418240 bytes\n255 heads, 63 sectors/track, 1305 cylinders, total 20971520 sectors\nUnits = sectors of 1 \* 512 = 512 bytes\nSector size (logical/physical): 512 bytes / 512 bytes\nI/O size (minimum/optimal): 512 bytes / 512 bytes\nDisk identifier: 0x00000000\n\n\nDisk /dev/mapper/vg0-root: 40.0 GB, 39996882944 bytes\n255 heads, 63 sectors/track, 4862 cylinders, total 78118912 sectors\nUnits = sectors of 1 \* 512 = 512 bytes\nSector size (logical/physical): 512 bytes / 512 bytes\nI/O size (minimum/optimal): 512 bytes / 512 bytes\nDisk identifier: 0x00000000\n\n\nDisk /dev/mapper/vg0-swap: 3137 MB, 3137339392 bytes\n255 heads, 63 sectors/track, 381 cylinders, total 6127616 sectors\nUnits = sectors of 1 \* 512 = 512 bytes\nSector size (logical/physical): 512 bytes / 512 bytes\nI/O size (minimum/optimal): 512 bytes / 512 bytes\nDisk identifier: 0x00000000”

}

TASK: [hardware | debug msg=“{{register\_fdisk.keys}}”] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

\<127.0.0.1\> ESTABLISH CONNECTION FOR USER: vagrant

ok: [allinone-1] =\> {

“msg”: “\<built-in method keys of dict object at 0x7ffdfbd570c0\>”

}

TASK: [hardware | debug msg=“{{register\_fdisk}}”] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

\<127.0.0.1\> ESTABLISH CONNECTION FOR USER: vagrant

fatal: [allinone-1] =\> A variable inserted a new parameter into the module args. Be sure to quote variables if they contain equal signs (for example: “{{var}}”).

---

<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:** [September 5, 2014, 1:18am UTC](https://forum.ansible.com/t/debug-statements-trigger-security-check-error-a-variable-inserted-a-new-parameter-into-the-module-args/16108/2 "2014-09-05T01:18:23Z")

</div>

As a preliminary question, what version of Ansible are you now using?
