# authorized\_key and multiple url as key source

**URL:** <https://forum.ansible.com/t/authorized-key-and-multiple-url-as-key-source/19393>\
**Category:** Ansible Project\
**Created:** [September 30, 2015, 4:33pm UTC](https://forum.ansible.com/t/authorized-key-and-multiple-url-as-key-source/19393 "2015-09-30T16:33:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrey\_Fesenko](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Andrey\_Fesenko](https://forum.ansible.com/u/Andrey_Fesenko)\
**Post date:** [September 30, 2015, 4:33pm UTC](https://forum.ansible.com/t/authorized-key-and-multiple-url-as-key-source/19393/1 "2015-09-30T16:33:09Z")

</div>

Hello,  
Can I possible to use authorized\_key thith multiple url as key source?  
If exclusive=yes I need to transfer all key a single batch as mentioned above.

My key store, has the following structure

- store  
– group1  
— user1  
---- key1.pub  
— user2  
---- key2.pub  
…  
– group2  
— user1  
---- key1.pub  
— user3  
---- key3.pub

simple task  
authorized\_key: user=‘{{ item.name }}’ key=‘{{ keys\_repo }}’/raw/‘{{ item.commit }}’/‘{{ item.key }}’.pub  
with\_items: ssh\_users

work fine, but it can not be replaced in a single operation all keys, it is necessary to first make one exclusive key, and then adding other.
