Eugene Knoxville
2015-07-24 11:41:25 UTC
Hello,
I'm using authorized_keys core module for managing the same name files. So,
what I need?
I have a role, and var file with all ssh-keys. For exmpl:
user1_key: SSH PUB KEY HERE
user2_key: SSH PUB KEY HERE
I want to define which users I can put to authorized_keys. For example, I
use in a playbook:
roles:
- { role: ssh.role, ssh_user: test1, ssh_user_key: "{{ user1_key }}",
"{{ user2_key }}" }
But... I need to define a list of values, separated with a "new line".
Using line above I'm getting authorized_keys file with 2 SSH keys,
separated with comma.
In role:
- name: Manage authorized_keys
authorized_key: user="{{ ssh_user }}" key="{{ ssh_user_key }}"
Please suggest!
I'm using authorized_keys core module for managing the same name files. So,
what I need?
I have a role, and var file with all ssh-keys. For exmpl:
user1_key: SSH PUB KEY HERE
user2_key: SSH PUB KEY HERE
I want to define which users I can put to authorized_keys. For example, I
use in a playbook:
roles:
- { role: ssh.role, ssh_user: test1, ssh_user_key: "{{ user1_key }}",
"{{ user2_key }}" }
But... I need to define a list of values, separated with a "new line".
Using line above I'm getting authorized_keys file with 2 SSH keys,
separated with comma.
In role:
- name: Manage authorized_keys
authorized_key: user="{{ ssh_user }}" key="{{ ssh_user_key }}"
Please suggest!
--
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 ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/8822031b-52d2-4b93-b540-37edbd4cf07b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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 ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/8822031b-52d2-4b93-b540-37edbd4cf07b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.