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

env_vars in pip_state vs. env in cmd #45348

Open
dhs-rec opened this issue Jan 9, 2018 · 9 comments
Open

env_vars in pip_state vs. env in cmd #45348

dhs-rec opened this issue Jan 9, 2018 · 9 comments
Labels
Core relates to code central or existential to Salt Feature new functionality including changes to functionality and code refactors, etc. State-Module
Milestone

Comments

@dhs-rec
Copy link
Contributor

dhs-rec commented Jan 9, 2018

Description of Issue/Question

Why is there a difference in the way environment variables are specified in pip.installed and cmd.run state methods?

Examples from the documentation:

django:
  pip.installed:
    - name: django_app
    - env_vars:
        CUSTOM_PATH: /opt/django_app
        VERBOSE: True

vs.

script-foo:
  cmd.run:
    - env:
      - BATCH: 'yes'

Differences are:

  1. env vs. env_vars
  2. dict vs. array

Could this be streamlined, please, so that there's only one unique way of specifying environment variables (and everywhere else where I didn't spot it, of course)?

See also:

https://docs.saltstack.com/en/latest/ref/states/all/salt.states.cmd.html#salt.states.cmd.run
https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pip_state.html#salt.states.pip_state.installed

@Ch3LL
Copy link
Contributor

Ch3LL commented Jan 9, 2018

I think this would be a good improvement. We would just need to make sure we properly deprecate the argument we do not choose.

@Ch3LL Ch3LL added Feature new functionality including changes to functionality and code refactors, etc. State-Module Core relates to code central or existential to Salt labels Jan 9, 2018
@Ch3LL Ch3LL added this to the Approved milestone Jan 9, 2018
@dhs-rec
Copy link
Contributor Author

dhs-rec commented May 18, 2018

Any news on this?

@Ch3LL
Copy link
Contributor

Ch3LL commented May 21, 2018

this is not currently assigned out to anyone due to other higher priority issues. Please feel free to try to send in a PR for this if you feel so inclined :)

@stale
Copy link

stale bot commented Sep 3, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label Sep 3, 2019
@dhs-rec
Copy link
Contributor Author

dhs-rec commented Sep 4, 2019

Yep.

@stale
Copy link

stale bot commented Sep 4, 2019

Thank you for updating this issue. It is no longer marked as stale.

@stale stale bot removed the stale label Sep 4, 2019
@stale
Copy link

stale bot commented Jan 7, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label Jan 7, 2020
@dhs-rec
Copy link
Contributor Author

dhs-rec commented Jan 8, 2020

And again.

@stale
Copy link

stale bot commented Jan 8, 2020

Thank you for updating this issue. It is no longer marked as stale.

@stale stale bot removed the stale label Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core relates to code central or existential to Salt Feature new functionality including changes to functionality and code refactors, etc. State-Module
2 participants