-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Module.run does not run the way described in the documentation #56422
Comments
@jtraub91 Thank you for reporting this issue. I am not able to replicate it, it seems to work correctly for me
According to the docs https://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html
to use the new style.
Thanks. |
Oh. Definitely did not have For reference, the only thing in my minion config was the master
|
Also, I want to point out, in your example, and duplicated on my system with the new config, the new and legacy styles do not behave the same. What explains that discrepancy? |
@frogunder Is the new
but this does not:
Errors with
I'm trying to convert a |
@hbokh Sorry for the late reply. It seems to work correctly for me with the two state files you used.
What distro do you see this error on? I used Ubuntu 20 with salt 3001.1 installed. Thanks. |
On Debian 9 "Stretch" and Salt 3001.1 |
I just tried on Debian 9 with Salt 3001.1 and it seems to work correctly for me.
I do not see the error you are describing, so not sure what is causing your issue. |
@jtraub91 is this still an issue for you? |
@jtraub91 is this still an issue and needs either a code fix and/or doc fix? |
I have the same issue with Salt 3002.7 on Debian stretch: hello world:
module.run:
- cmd.run:
- cmd: "echo hello world" sudo salt my-minion state.apply foo my-minion:
----------
ID: hello world
Function: module.run
Result: False
Comment: Module function hello world is not available
Started: 12:36:39.533395
Duration: 2.836 ms
Changes: However this state works: hello world:
module.run:
- name: cmd.run
- cmd: "echo hello world" |
I have this problem too, running salt 3005.1 |
Never mind, I figured out my minions are running version 3004.3, and they were missing the parameter in the minion config file:
After adding this parameter to the config file, the so-called modern approach works fine. |
Description of Issue
The documentation located here describes the new and legacy style of passing arguments when using the
module.run
state function. However, the new style does not behave as described and the legacy style provides a warning that this will be deprecated in the Sodium release. This can be frustrating for users.Setup
Normal salt installation. Create the following test state to demonstrate.
Steps to Reproduce Issue
Run the state.
Even in the successful case, the logs warn the user that this will be deprecated in Sodium.
Versions Report
The text was updated successfully, but these errors were encountered: