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

Allow for aws_ssm plugin option to be provided by an environment variable #1990

Open
1 task done
abeluck opened this issue Oct 31, 2023 · 2 comments
Open
1 task done

Comments

@abeluck
Copy link

abeluck commented Oct 31, 2023

Summary

When running the same playbook on different host machines the location of the session-manager-plugin binary may not be in the same location on each machine.

It would be very helpful to be able to load the ansible_aws_ssm_plugin option from an environment variable, like many of the other options.

Issue Type

Feature Idea

Component Name

aws_ssm

Additional Information

https://github.com/ansible-collections/community.aws/blob/main/plugins/connection/aws_ssm.py#L73-L77

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@kepstin
Copy link
Contributor

kepstin commented Dec 6, 2023

With most methods of installing it, the session-manager-plugin binary can be found on the system $PATH. It would be really nice if by default the module ran the version found on the $PATH rather than require that you provide an absolute path.

This will involve setting the default plugin executable to just "session-manager-plugin" and removing the os.path.exists check. Additional error handling on the subprocess.Popen call might be needed so people get a useful error message if the plugin was not found.

@chrismazanec
Copy link

we use a lookup plugin as a workaround for that

ansible_aws_ssm_plugin: "{{ lookup('ansible.builtin.pipe', 'which session-manager-plugin') }}"

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