aws / amazon-ssm-agent

An agent to enable remote management of your EC2 instances, on-premises servers, or virtual machines (VMs).
https://aws.amazon.com/systems-manager/
Apache License 2.0
1.04k stars 323 forks source link

Ability to reload environment variables #360

Open k-brooks opened 3 years ago

k-brooks commented 3 years ago

We have a use case whereby (system) environment variables are created in one session managed by the ssm-agent, and consumed in another, later on. We have found that unless we restart the agent, the environment variables are not available in later sessions through the (session) environment provided by the agent. It would be great if we could trigger an environment variable reload or something of the like to permit environment variable use across sessions.

gillg commented 2 years ago

That's a big problem when you use Ansible as an exemple... Ansible with SSM connection plugin can update system wide env vars like the PATH, but in fact any SSM session (including next Ansible tasks) are always using the ENV context from the SSM service start

k-brooks commented 2 years ago

Chef has a similar problem