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

Fails on Windows 11 Pro #3

Open
huyz opened this issue Mar 31, 2023 · 0 comments
Open

Fails on Windows 11 Pro #3

huyz opened this issue Mar 31, 2023 · 0 comments

Comments

@huyz
Copy link

huyz commented Mar 31, 2023

Describe the bug
Trying to run it, I get:

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: at <ScriptBlock>, <No file>: line 733
fatal: [myhost]: FAILED! => {"changed": false, "msg": "Unhandled exception while executing module: The term 'Repair-AuthorizedKeyPermission' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again."}

To Reproduce
Steps to reproduce the behavior:

roles:
    - informatiquecdc.win_authorized_key
 vars:
    pub_file_for_ssh: ~/.ssh/id_ed25519.pub

tasks:
    - name: Add to authorized_keys the content of {{ pub_file_for_ssh }}
      win_authorized_key:
        user: "{{ ansible_user }}"
        key: "{{ lookup('file', pub_file_for_ssh) }}"

Additional context

I believe this may be due to OpenSSHUtils being deprecated; see MicrosoftDocs/windowsserverdocs#4788 (comment)

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