How do i set multiple authorized keys to my ansible playbook?

0 votes
How do i set multiple authorized keys to my ansible playbook?
Feb 11 in Ansible by Himanshu
27 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Try this:

- name: Set up multiple authorized keys
  authorized_key:
    user: deploy
    state: present
    key: '{{ item }}'
  with_file:
    - public_keys/doe-jane
    - public_keys/doe-john
answered Feb 11 by John

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How do I backup my ansible playbooks?

In addition to the install.yml file included with your setup.sh setup ...READ MORE

answered Feb 4 in Ansible by Anushri
12 views
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

How do I add ssh authorized keys in ansible playbook?

Hey @kailash use the authorized_key plugin that ...READ MORE

answered Feb 11 in Ansible by Kyra
50 views
0 votes
2 answers

How do i install Ansible using virtualenv

Adding to @Mohit's answer,  For CentOS and RHEL: sudo ...READ MORE

answered Jan 10 in Ansible by Dikinson
42 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.