Hi,
I'm trying to setup authorized_keys without copying the key files over to the target.
When I do this it works:
- name: populate authorized_keys
authorized_keys: user=blah key={{item}} state=present
with_file:
- grant/x.pub
- grant/y.pub
But when I try the following:
- name: populate authorized_keys
authorized_keys: user=blah key={{item}} state=present
with_filegob:
- grant/*
I get "failed: "true", item: "/home/yves/xxxx/roles/sshkeys/files/grant/x.pub", msg: invalid key specified
Does that mean that with_fileglob sends the name of the file rather than the content of the file?
How can I make with_file lookup a list of files? Or how can I make with_fileglob copy the content of the files?
Thanks