Skip to content

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

@markdorison

Description

@markdorison

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions