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

Closed
1 task done
abeluck opened this issue Oct 31, 2023 · 2 comments · Fixed by #2247
Closed
1 task done

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

abeluck opened this issue Oct 31, 2023 · 2 comments · Fixed by #2247
Labels
jira Adds the issue to cloud content backlog refinement jira board

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') }}"

@GomathiselviS GomathiselviS added the jira Adds the issue to cloud content backlog refinement jira board label Nov 11, 2024
softwarefactory-project-zuul bot pushed a commit that referenced this issue Feb 24, 2025
…variable (#2247)

SUMMARY

Closes #1990

Add the possibility to define the aws_ssm_plugin variable using environment variable AWS_SESSION_MANAGER_PLUGIN
To avoid breaking change, the default value of the aws_ssm_plugin will remains /usr/local/bin/session-manager-plugin, in case the path is not found, the plugin will try to find the executable from the PATH


ISSUE TYPE


Feature Pull Request

COMPONENT NAME

connection/aws_ssm

Reviewed-by: Mark Chappell
patchback bot pushed a commit that referenced this issue Feb 24, 2025
…variable (#2247)

SUMMARY

Closes #1990

Add the possibility to define the aws_ssm_plugin variable using environment variable AWS_SESSION_MANAGER_PLUGIN
To avoid breaking change, the default value of the aws_ssm_plugin will remains /usr/local/bin/session-manager-plugin, in case the path is not found, the plugin will try to find the executable from the PATH

ISSUE TYPE

Feature Pull Request

COMPONENT NAME

connection/aws_ssm

Reviewed-by: Mark Chappell
(cherry picked from commit c04ca7a)
softwarefactory-project-zuul bot pushed a commit that referenced this issue Feb 24, 2025
…variable (#2247) (#2251)

This is a backport of PR #2247 as merged into main (c04ca7a).
SUMMARY

Closes #1990

Add the possibility to define the aws_ssm_plugin variable using environment variable AWS_SESSION_MANAGER_PLUGIN
To avoid breaking change, the default value of the aws_ssm_plugin will remains /usr/local/bin/session-manager-plugin, in case the path is not found, the plugin will try to find the executable from the PATH


ISSUE TYPE


Feature Pull Request

COMPONENT NAME

connection/aws_ssm

Reviewed-by: Mark Chappell
Reviewed-by: Bikouo Aubin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira Adds the issue to cloud content backlog refinement jira board
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants