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.