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

Failed: Couldn't resolve module/action 'authorized_key' #53

Open
markdorison opened this issue May 11, 2022 · 0 comments
Open

Failed: Couldn't resolve module/action 'authorized_key' #53

markdorison opened this issue May 11, 2022 · 0 comments

Comments

@markdorison
Copy link

I am encountering the following error when using ansible core 2.12.0

FAILED! => {"reason": "couldn't resolve module/action 'authorized_key'. This often indicates a misspelling, missing collection, or incorrect module path.\n\nThe error appears to be in '/github/home/.ansible/roles/weareinteractive.users/tasks/manage_user_home.yml': line 28, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Adding user's authorized keys\n ^ here\n"}

Did something change where the following block needs to use ansible.posix.authorized_key instead of authorized_key?

- name: Adding user's authorized keys
authorized_key:
key: "{{ user.authorized_keys | default([]) | join('\n') }}"
user: "{{ user.username }}"
exclusive: "{{ user.authorized_keys_exclusive | default(users_authorized_keys_exclusive) }}"
when: not ansible_check_mode

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

No branches or pull requests

1 participant