authorized_keys

122 views
Skip to first unread message

Frank

unread,
Sep 16, 2014, 11:43:43 AM9/16/14
to ansible...@googlegroups.com
Hi,

I’m using authorized_keys module without success…

users:
  - name: user1
    keys:
      - user1.pub
    groups:
      - admins
      - webmasters

- name: authorized_keys
  authorized_key: >
    user={{ item.0.name }}
    key="{{ lookup('file', '../../../keys/ssh/' + item.0.name + '.pub') }}"
    manage_dir=yes
  with_subelements:
    - users
    - keys

I get this error:

failed: [support] => (item=({'name': ‘user1', 'groups': ['admins', 'webmasters']}, ‘user1.pub')) => {"failed": true, "item": [{"groups": ["admins", "webmasters"], "name": “user1"}, “user1.pub"]}
msg: invalid key specified: ---- BEGIN SSH2 PUBLIC KEY ——

the keys are working fine. any tip?

Regards,
Frank

Frank

unread,
Sep 16, 2014, 12:17:29 PM9/16/14
to ansible...@googlegroups.com
err this key _was_ broken… fixed.

-- 
Change is the essential process of all existence.
-- Spock, "Let That Be Your Last Battlefield", stardate 5730.2
Reply all
Reply to author
Forward
0 new messages