Hi all,
I have a few editor rpms that require variable to be exported before rpm installation.
It would be nice if salt could support that.
Regards,
Fr茅d茅ric
Thanks for the request! This shouldn't be too hard to add.
With 2015.5.2 (Lithium) it's not working but once upon a time I could use this like:
sudo-ldap:
pkg.installed:
- env:
- SUDO_FORCE_REMOVE: yes
Please add this capability to pkg.installed and friends. It is arguably rarely used and can be worked around by using the cmd module, but for example installing sudo-ldap over sudo on Debian/Ubuntu requires an environment variable to be set for sudo removal; if not set, the package manager will always fail to complete the operation since a maintainer script errors out.
Yeah I need this for a few different things as well.
In 2015.8.10 it can be done in this way:
cassandra.prevent_start.enable:
environ.setenv:
- name: RUNLEVEL
- value: "1"
cassandra.installed:
pkg.installed:
- name: cassandra
cassandra.prevent_start.disable:
environ.setenv:
- name: _
- value:
RUNLEVEL: False
- false_unsets: True
If it's too long, you can always define a macro.
It would be nice to have "env" parameter, but it would duplicate existing feature.
This looks abandoned but is still relevant.
And getting the trick above to work prereq(_in) and onchanges(_in) often causes runtime errors of "maximum recursion depth exceeded", randomly.
+++ me need it too
+1
I can confirm that the following works in 2018.3.3:
sudo_installed:
environ.setenv:
- name: SUDO_FORCE_REMOVE
- value: 'yes'
- prereq:
- pkg: sudo_installed
pkg.installed:
- name: sudo-ldap
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.
Most helpful comment
I can confirm that the following works in 2018.3.3: