Set umask for an individual salt state
jeanid last edited by
Is there a way to set the umask for the pip state module or is there a more generic way to set the umask before specific state modules are run? In ansible the pip module takes a umask parameter. I do not see an equivalent option in the salt pip state module. We run salt-call with a umask of 007 but we need to install certain python packages with more open permissions; is there a way to do this?
No, there's no facility for changing the umask of the running Salt process.
What you could do is start a new process with
install python module: cmd.run: - name: pip install foo - umask: '077' - unless: - fun: pip.is_installed pkgname: foo
install python module at version:
- name: pip install bar==4.2
- umask: '077'
- pip freeze | grep bar==4.2