# authorized\_key module fails when key=value has a space

**URL:** <https://forum.ansible.com/t/authorized-key-module-fails-when-key-value-has-a-space/12904>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [June 4, 2013, 8:13pm UTC](https://forum.ansible.com/t/authorized-key-module-fails-when-key-value-has-a-space/12904 "2013-06-04T20:13:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [June 4, 2013, 8:13pm UTC](https://forum.ansible.com/t/authorized-key-module-fails-when-key-value-has-a-space/12904/1 "2013-06-04T20:13:01Z")

</div>

Can you show me the output from when you are running:

- name: Add nagios ssh key  
authorized\_key: user=nagios key=“${nagios\_public\_key.stdout}” state=present

Since you have multiples in there it will obviously fail at the first one, and dare I say it, the quoting should be sufficient in your case so I don’t /quite/ think it’s failing in the way you specify 🙂

---

<div class="post-metadata">

**Author:** ![Dave\_Stern](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@Dave\_Stern](https://forum.ansible.com/u/Dave_Stern)\
**Post date:** [June 7, 2013, 2:41pm UTC](https://forum.ansible.com/t/authorized-key-module-fails-when-key-value-has-a-space/12904/2 "2013-06-07T14:41:01Z")

</div>

You’re right, that worked. Config typo after several failed attempts. Appreciate the help.
