# duplicate parameter was found in the argument string

**URL:** <https://forum.ansible.com/t/duplicate-parameter-was-found-in-the-argument-string/18972>\
**Category:** Ansible Developer\
**Created:** [August 7, 2015, 10:53pm UTC](https://forum.ansible.com/t/duplicate-parameter-was-found-in-the-argument-string/18972 "2015-08-07T22:53:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bob\_Tanner](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Bob\_Tanner](https://forum.ansible.com/u/Bob_Tanner)\
**Post date:** [August 7, 2015, 10:53pm UTC](https://forum.ansible.com/t/duplicate-parameter-was-found-in-the-argument-string/18972/1 "2015-08-07T22:53:15Z")

</div>

Stumble upon what I believe might be regression.

Playbook looks like this:

- hosts: nagios\_server

vars:

backuppc\_client:  
username: “rsyncbackuppc”  
shell: “/bin/bash”  
home: “/var/lib/rsyncbackup”  
comment: “Backuppc User”  
key: “{{ lookup(‘file’, ‘authorized\_keys’) }}”

Simple play

- debug: msg=“{{ backuppc\_client }}”  
tags: backuppc

Results

$ ansible-playbook -i vagrant-inventory nagios-server.yml -K --tags “backuppc”  
SUDO password:

PLAY [nagios\_server] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

GATHERING FACTS \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ok: [nagios\_server]

TASK: [backuppc-client | debug msg=“{{ backuppc\_client }}”] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [nagios\_server] =\> a duplicate parameter was found in the argument string (–exclude)

FATAL: all hosts have already failed – aborting

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
nagios\_server : ok=1 changed=0 unreachable=1 failed=0

Looking inside the authorized\_keys file I see the --exclude multiple times. Why is lookup() looking into the file and parsing(?) it? This issue looks like the issue discussed here

[http://bit.ly/1HwpHu2](http://bit.ly/1HwpHu2)  
v1.6.8 ERROR: a duplicate parameter was found in the argument string

[http://git.io/vOjYZ](http://git.io/vOjYZ)  
Shell module: “a duplicate parameter was found in the argument string ()” · Issue #1077

Let me know if I should open an issue regarding this problem or if it’s just a person problem. 🙂

---

<div class="post-metadata">

**Author:** ![Bob\_Tanner](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Bob\_Tanner](https://forum.ansible.com/u/Bob_Tanner)\
**Post date:** [August 7, 2015, 11:07pm UTC](https://forum.ansible.com/t/duplicate-parameter-was-found-in-the-argument-string/18972/2 "2015-08-07T23:07:10Z")

</div>

- debug: msg=‘{{ backuppc\_client.key }}’

tags: backuppc

Changing msg to backuppc\_client.key and replacing quotes (") with single-quotes (') the debug play works as expected.

- debug: msg=‘{{ backuppc\_client }}’  
tags: backuppc

Single-quotes and and .key and the play fails.

So not sure what’s going on.

$ ansible --version  
ansible 2.0.0 (devel 48840ad498) last updated 2015/08/07 04:42:01 (GMT -500)  
lib/ansible/modules/core: (detached HEAD 8412adc4f9) last updated 2015/08/07 04:42:01 (GMT -500)  
lib/ansible/modules/extras: (detached HEAD 210ee3febc) last updated 2015/08/06 17:01:42 (GMT -500)  
v1/ansible/modules/core: (detached HEAD f8d8af17cd) last updated 2015/06/03 00:37:54 (GMT -500)  
v1/ansible/modules/extras: (detached HEAD 495ad450e5) last updated 2015/06/03 00:37:58 (GMT -500)  
configured module search path = None

But I’ve source v1 configuration.
