# Can I use with\_dict for adding authorized\_key for users in a user dict?

**URL:** <https://forum.ansible.com/t/can-i-use-with-dict-for-adding-authorized-key-for-users-in-a-user-dict/15461>\
**Category:** Ansible Project\
**Created:** [June 13, 2014, 8:58pm UTC](https://forum.ansible.com/t/can-i-use-with-dict-for-adding-authorized-key-for-users-in-a-user-dict/15461 "2014-06-13T20:58:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zack\_Perry](https://avatars.discourse-cdn.com/v4/letter/z/54ee81/32.png) [@Zack\_Perry](https://forum.ansible.com/u/Zack_Perry)\
**Post date:** [June 13, 2014, 8:58pm UTC](https://forum.ansible.com/t/can-i-use-with-dict-for-adding-authorized-key-for-users-in-a-user-dict/15461/1 "2014-06-13T20:58:18Z")

</div>

I have the following simple test playbook, t.yml

---

<div class="post-metadata">

**Author:** ![Zack\_Perry](https://avatars.discourse-cdn.com/v4/letter/z/54ee81/32.png) [@Zack\_Perry](https://forum.ansible.com/u/Zack_Perry)\
**Post date:** [June 13, 2014, 9:05pm UTC](https://forum.ansible.com/t/can-i-use-with-dict-for-adding-authorized-key-for-users-in-a-user-dict/15461/2 "2014-06-13T21:05:33Z")

</div>

Quick follow-up. I also have the test id\_rsa.pub in `pwd`/files/testuser

– Zack

---

<div class="post-metadata">

**Author:** ![Zack\_Perry](https://avatars.discourse-cdn.com/v4/letter/z/54ee81/32.png) [@Zack\_Perry](https://forum.ansible.com/u/Zack_Perry)\
**Post date:** [June 13, 2014, 9:19pm UTC](https://forum.ansible.com/t/can-i-use-with-dict-for-adding-authorized-key-for-users-in-a-user-dict/15461/3 "2014-06-13T21:19:52Z")

</div>

Got it. I used the wrong loop construct. Should have used with\_subelements with a different input dict.
