Skip to content

Use environment variables in actions #1034

@dzimine

Description

@dzimine

Initially posted by @jtopjian in google groups:

Is it possible for actions to inherit the environment of the user that issued the action?

I think this would be useful in many scenarios, but the one scenario that made me think of it was playing with the OpenStack pack. That pack comes with a config.yml file that asks for the OpenStack cloud information. The problem here is that it requires me to have a credentials file in a different format than the openrc file we normally deploy (which is a bit of a hassle when we have that config file under config management). Secondly it is limited to only one cloud/region. On some of our "control" servers, we have several rc files for different clouds and regions of those clouds. If we want to run a command against a certain cloud, we just source the specific rc file.

By being able to inherit the environment, we could then gain the flexibility of being able to run actions against several clouds without creating a complex config.yml as well as prefix the environment in cron and such (though StackStorm can do cron on its own ;)

Of course this would also require modifying the OpenStack pack (for this specific scenario) but that's rather easy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions