duplicate parameter was found in the argument string

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
v1.6.8 ERROR: a duplicate parameter was found in the argument string

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. :slight_smile:

  • 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.