# authorized\_key not working on the latest devel

**URL:** <https://forum.ansible.com/t/authorized-key-not-working-on-the-latest-devel/13743>\
**Category:** Ansible Project\
**Created:** [October 22, 2013, 2:04pm UTC](https://forum.ansible.com/t/authorized-key-not-working-on-the-latest-devel/13743 "2013-10-22T14:04:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicolas\_G](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@Nicolas\_G](https://forum.ansible.com/u/Nicolas_G)\
**Post date:** [October 22, 2013, 2:04pm UTC](https://forum.ansible.com/t/authorized-key-not-working-on-the-latest-devel/13743/1 "2013-10-22T14:04:18Z")

</div>

Hi,

In ansible 1.4 (devel 4f13967386) last updated 2013/10/22 13:48:49 (GMT +000) the bellow tasks has stopped working :

``1

- name: Deploying user(s) ssh key(s)  
authorized\_key: user=${item.user} key=“{{ lookup(‘file’, ‘public-keys/’ + item.user + ‘.pub’) }}”  
with\_items: ssh\_users  
tags:
- copy
- credentials

```auto

Output

```

TASK: [common | Deploying user(s) ssh key(s)] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
\<[ss2.xyz.net](http://ss2.xyz.net)\> ESTABLISH CONNECTION FOR USER: root on PORT 22 TO [ss2.xyz.net](http://ss2.xyz.net)  
\<[ss2.xyz.net](http://ss2.xyz.net)\> EXEC /bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-1382449993.6-110248301379805 && echo $HOME/.ansible/tmp/ansible-1382449993.6-110248301379805’  
\<[ss2.xyz.net](http://ss2.xyz.net)\> REMOTE\_MODULE authorized\_key user=nicolasg key=“{{lookup(‘file’, ‘public-keys/’ + item.user + ‘.pub’)}}”  
\<[ss2.xyz.net](http://ss2.xyz.net)\> PUT /tmp/tmpv\_7zAk TO /root/.ansible/tmp/ansible-1382449993.6-110248301379805/authorized\_key  
\<[ss2.xyz.net](http://ss2.xyz.net)\> EXEC /bin/sh -c ‘sudo -k && sudo -H -S -p “[sudo via ansible, key=ymbyzjxzulvzioocwmdircnvbjjasnxt] password: " -u root /bin/sh -c '”’“‘/usr/bin/python /root/.ansible/tmp/ansible-1382449993.6-110248301379805/authorized\_key; rm -rf /root/.ansible/tmp/ansible-1382449993.6-110248301379805/ \>/dev/null 2\>&1’”‘"’’  
failed: [[ss2.xyz.net](http://ss2.xyz.net)] =\> (item={‘user’: ‘nicolasg’}) =\> {“failed”: true, “item”: {“user”: “nicolasg”}}  
msg: invalid key specified: {{lookup(‘file’, ‘public-keys/’ + item.user + ‘.pub’)}}

```auto

Have something changed regarding the authorized_key module ? it works ok if I run version 1.3.3 .
```

---

<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:** [October 22, 2013, 2:39pm UTC](https://forum.ansible.com/t/authorized-key-not-working-on-the-latest-devel/13743/2 "2013-10-22T14:39:30Z")

</div>

Hi, we’re aware and there’s a ticket for this.

The problem is not with authorized\_key in this case just that we need to repair lookup plugin operation.

AnsibleFest is today so it may be a while.

Stay tuned or use a production release.

---

<div class="post-metadata">

**Author:** ![Nicolas\_G](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@Nicolas\_G](https://forum.ansible.com/u/Nicolas_G)\
**Post date:** [October 22, 2013, 3:17pm UTC](https://forum.ansible.com/t/authorized-key-not-working-on-the-latest-devel/13743/3 "2013-10-22T15:17:39Z")

</div>

Good luck with AnsibleFest then 😉
