Hi,
I am just starting to learn ansible and have a question regarding the "authorized_key" Modul.
what i am trying to accomplish is add multiple ssh public keys to a remote systems root user.
in the documentation
http://docs.ansible.com/authorized_key_module.htmli see that i need something like this
# Using with_file
- name: Set up authorized_keys for the deploy user
authorized_key: user=deploy
key="{{ item }}"
with_file:
- public_keys/doe-jane
- public_keys/doe-john
so i created a playbook "ssh-keys.yml" with this contend
---
- name: "Set up authorized_keys for the root user"
hosts: testvms
user: root
tasks:
- name: Set up authorized_keys for the root user
authorized_key: user=root
key="{{ item }}"
with_file:
- /path/to/pub-key/user-a
- /path/to/pub-key/user-b
i receive the following error running this playbook
# ansible-playbook -v ssh-keys.yml
ERROR: with_file is not a legal parameter in an Ansible PlaybookOS Information
ansible server
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.4 (Santiago)
# ansible-playbook --version
ansible-playbook 1.5any idea what i did wrong?