Repository navigation
Closed
Labels
P2Priority 2bugbroken, incorrect, or confusing behaviordocumentationRelates to Salt documentationseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone
Description
Description of Issue/Question
The documentation in https://docs.saltstack.com/en/develop/ref/states/all/salt.states.module.html#execution-of-salt-modules-from-within-states is incorrect, and contains no
actual description of the salt.states.module.run call.
The doc gives the example:
mine.send:
module.run:
- network.interfaces
Setup
Install a fresh salt master, today's develop HEAD, in a virtual machine.
Steps to Reproduce Issue
I create a similar state in bevy_master.sls:
update_the_grains:
module.run:
- saltutil.sync_grains
and the result is:
vagrant@bevymaster:~$ sudo salt-call state.apply bevy_master
local:
Data failed to compile:
----------
Too many functions declared in state 'module' in SLS 'bevy_master'
So I remove the "-"
update_the_grains:
module.run:
saltutil.sync_grains
This time I get:
vagrant@bevymaster:~$ sudo salt-call state.apply bevy_master
local:
Data failed to compile:
----------
State 'update_the_grains' in SLS 'bevy_master' is not formed as a list
Oh, well. Go back to the old way of saying it:
update_the_grains:
module.run:
- name: saltutil.sync_grains
and get:
vagrant@bevymaster:~$ sudo salt-call state.apply bevy_master
[WARNING ] The function "module.run" is using its deprecated version and will expire in version "Sodium".
There is no way to win.
Versions Report
At the bottom of the html page it says:
Generated on December 07, 2017 at 07:11:35 MST.
You are viewing docs built from a recent snapshot of the develop branch. `
vagrant@bevymaster:~$ salt --versions-report
Salt Version:
Salt: 2017.7.0-892-g9865a31
Dependency Versions:
cffi: 1.5.2
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.8
libgit2: 0.24.0
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: 2.14
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: 0.24.0
Python: 2.7.12 (default, Nov 20 2017, 18:23:56)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.2.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4
System Versions:
dist: Ubuntu 16.04 xenial
locale: UTF-8
machine: x86_64
release: 4.4.0-21-generic
system: Linux
version: Ubuntu 16.04 xenial
Reacted by Marco Molteni and DERNAT Rémy
Metadata
Metadata
Assignees
Labels
P2Priority 2bugbroken, incorrect, or confusing behaviordocumentationRelates to Salt documentationseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Activity
vernondcole commentedon Dec 8, 2017
With no actual description of the calling parameters, there is no way of guessing what is wanted.
lorengordon commentedon Dec 8, 2017
Not sure why the documented list form isn't working, but I think you were close with this one:
The doc (which is confusing in the presentation of new vs old forms) does have examples where the new form is a dictionary:
So, based on that example, I think if you write yours as a dictionary, it will work without the deprecation warning:
marco-m commentedon Apr 20, 2018
Hello @Ch3LL I don't think this is blocked by an answer for @vernondcole , since what he reports is still valid, I can only copy and paste his text:
The very first example in the documentation
is simply broken :-)
Ch3LL commentedon Apr 23, 2018
does this work for you:
marco-m commentedon Apr 23, 2018
here is what I get:
Ch3LL commentedon Apr 24, 2018
apologies the way its written is with the new format, which requires in the config:
I think we can definitely improve the documentation to clearly show which format is which.
b-a-t commentedon Nov 15, 2018
Hit this just recently. The error message is very vague and documentation is (still) misleading. Based on some googling I came down to this announcement according to which you should either use old syntax:
and get deprecation warning or use new syntax:
with the minion config having stanza:
cr1st1p commentedon Jan 26, 2019
#51349 module.run doc needs improvement about the 'new format' ...
devurandom commentedon Mar 6, 2019
How do I set
use_supersededforsalt-ssh?waynew commentedon Apr 15, 2019
@devurandom When I did a Google search for
salt-ssh config fileit took me to https://docs.saltstack.com/en/latest/topics/ssh/ which has a subsection https://docs.saltstack.com/en/latest/topics/ssh/#minion-configIn there you can find that you should edit
/etc/salt/masterand add:Fix the error for mkpart.
drbd_node: Fix the error for mkpart with module.run.