Hi all,
If someone could help me on the following:
I am trying to automate as maximum as possible the addition of authorized
keys to my new remote servers by doing the below playbook, but I am getting
the following error:
===============================================================
fatal: [web]: FAILED! => {"failed": true, "msg": "'list object' has no
attribute 'name'"}
fatal: [db]: FAILED! => {"failed": true, "msg": "'list object' has no
attribute 'name'"}
===============================================================
I've tried playing with the list of variables, tried also new loop
with_item after the with_file, still no good luck, could someone please
tell me how can I achieve my goal by having authorized_key module going to
each file without specifying each time the full address like
public_keys/web/authorized_key
- hosts: all
vars:
pcs:
- name: web
- name: db
tasks:
- name: Set up authorized_keys for the deploy user
authorized_key: user=root key="{{ item }}"
with_file:
- public_keys/{{ pcs.name }}/authorized_key
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/3a16bee3-22df-48e6-80d2-ec398d639ade%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.