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

Exceptions after upgrading to ansible 4.x #33

Open
apparentorder opened this issue Jul 14, 2021 · 1 comment
Open

Exceptions after upgrading to ansible 4.x #33

apparentorder opened this issue Jul 14, 2021 · 1 comment
Assignees

Comments

@apparentorder
Copy link

Hi,

I'm posting this more as a "knowledge base entry" than anything else, because I managed to get everything working again. I hope it helps someone who gets stuck in the same situation (I propose to close it after both issues are addressed sshjail's code).

I've been very lazy with upgrading, so after finally switching to ansible 4.x, I hit two bumps. Note that I didn't change any configuration or ansible data though.

First one:

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: KeyError: 'Requested entry (plugin_type: connection plugin: sshjail setting: timeout ) was not defined in configuration.'
fatal: [...]: FAILED! => {"msg": "Unexpected failure during module execution.", "stdout": ""}

As it turns out, this issue is already fixed in #32. I used that fork and the error was gone...

... leading me to the second one:

  File "[...]/plugins/connection/sshjail.py", line 449, in _copy_file
    copycmd = plugin.build_become_command(' '.join(['cp', from_file, to_file]), shell)
AttributeError: 'NoneType' object has no attribute 'build_become_command'
fatal: [...]: FAILED! => {
    "msg": "Unexpected failure during module execution.",
    "stdout": ""
}

This issue is already addressed in #30. I'm in the same situation: Ansible sshs to root@jailhost so never needed any become in the first place. It would be cool if this worked like before, but the workaround of configuring become=true, become_method=su (as documented in readme) helped.

That's all.

And thanks a lot for this wonderful plugin. It keeps my jail frankenstein zoo alive! :-)

@grembo
Copy link
Contributor

grembo commented Jul 31, 2021

Thanks for the patch, that helped me. I also needed #34 applied for it to work properly though.

@austinhyde austinhyde self-assigned this Jul 31, 2021
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

3 participants