-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
P2Priority 2Priority 2bugbroken, incorrect, or confusing behaviorbroken, incorrect, or confusing behaviordocumentationRelates to Salt documentationRelates to Salt documentationseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around3rd 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Priority 2Priority 2bugbroken, incorrect, or confusing behaviorbroken, incorrect, or confusing behaviordocumentationRelates to Salt documentationRelates to Salt documentationseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around3rd level, incorrect or bad functionality, confusing and lacks a work around