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

Change default Interpreter #2

Open
dwydler opened this issue Jul 27, 2021 · 3 comments
Open

Change default Interpreter #2

dwydler opened this issue Jul 27, 2021 · 3 comments

Comments

@dwydler
Copy link

dwydler commented Jul 27, 2021

Today, i found time to test the wrapper in our development environment. After some cups of coffee and some ice, runs ansible in combination with The Bastion. Thanks again for the plugin!

I noticed zwei little things:

  • In both python scripts you use pyhton als default interpreter. In the system requierments did you write Python 3. I had to create a symlink for the wrapper to work. Wouldn't it be better to change the interpreter to pyhton3?
  • In the section "Configuration via ansible.cfg" in the README.md you use relative paths. Perhaps you can add a hint, that this only work if ansible (configuration) user based and not system based.
@RomainL972
Copy link

Hi,
I also have this issue, I had to install python-is-python3 on Ubuntu for the scripts to work.

@dwydler
Copy link
Author

dwydler commented Oct 10, 2021

@speed47 Do you have time to look into this issue?

@speed47
Copy link
Collaborator

speed47 commented Apr 4, 2022

Sorry about the delay! Can you try with the current main branch? We've just merged #8 that references python3 explicitly

wilfriedroset pushed a commit to wilfriedroset/the-bastion-ansible-wrapper that referenced this issue Aug 30, 2022
Merge in SOC/bastion-ansible-wrapper from dev/julien.riou/inventory_cache to master

* commit '10dc34ce65654a09f736e34ef19b228f9e73b937':
  feat: Add Ansible inventory cache (ovh#7)
  feat: Use Python 3 interpreter (ovh#2) (ovh#8)
  fix: Detect hostvars with hostname (ovh#9)
wilfriedroset added a commit that referenced this issue Apr 26, 2024
Compared to the Vanilla Ansible, Mitogen calls `sshwrapper.py`
differently. This imply a different parsing to extract the options, host
and command. Moreover, Mitogen does not passes the `remote_user`
therefore we must set as well `BASTION_ANSIBLE_REMOTE_USER` env var.

Apart from setting the `BASTION_ANSIBLE_REMOTE_USER` the wrapper works
for both vanilla and mitogen connection. Users should refer to mitogen
to learn about the installation process.

The following commit has been tested with:
* Test case #1
  * Mitogen 0.3.7
  * Ansible 210.8
  * Python 3.9.2
  * Debian 11.9
* Test case #2
  * Mitogen 0.3.7
  * Ansible 2.16.6
  * Python 3.12

Signed-off-by: Wilfried Roset <[email protected]>
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