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