Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Role fails when no authorized_keys specified #4

Closed
mvdriel opened this issue Jun 20, 2015 · 3 comments · Fixed by #7
Closed

Role fails when no authorized_keys specified #4

mvdriel opened this issue Jun 20, 2015 · 3 comments · Fixed by #7
Labels

Comments

@mvdriel
Copy link
Member

mvdriel commented Jun 20, 2015

Role fails when no authorized_keys specified for a user. Error: could not find 'authorized_keys' key in iterated item

@tersmitten tersmitten added the bug label Jun 20, 2015
@tersmitten
Copy link
Member

@mvdriel You've build it yourself :-)

Maybe do something like this - "{{ authorized_keys | default([]) }}? Can you test it?

This is probably also an issue for public and private keys

@mvdriel
Copy link
Member Author

mvdriel commented Jun 20, 2015

@tersmitten Yes and no, when there was only one keys array (authorized_keys) per user, it would be strange to not specify this one.

I already tried your suggestion, but it doesn't seem to be so easy. There is discussion about a related feature request, see ansible/ansible#9827

@tersmitten What do you think about my "ugly" patch?

@tersmitten
Copy link
Member

It is a solution, but so much more code :-( Wouldn't it be easier to change the documentation and make the properties required. At least []?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants