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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
manage multiple files in same state #52130
Comments
soooo... typos, they'll get you every time. Managing multiple files in the same state DOES work, if you format the state properly. Both of the following work:
and
Although this has been resolved, I think that adding an example to the docs will be beneficial. |
sounds like a good idea. Did you want to try to add this to the docs? You would just need to update the |
typo(s) still abound in the above examples:
*** don't omit this second colon or you'd get |
Edit
Turns out the original issue was caused by a typo 馃槉. There may still be an opportunity to improve the docs by including a working example using the names declaration in a file.managed state.
Description of Issue/Question
According to the docs, it should be possible to manage multiple files in one state using the 'names' parameter. However, the results in an error "Rendering SLS failed: mapping values are not allowed in this context"
Related #4508 - specifically shorawitz commented on Feb 12, 2016
The docs may be misleading and may need to be reviewed or a good, working example of managing multiple files using the names parameter should be added to the docs.
Related documentation links:
https://docs.saltstack.com/en/2019.2/ref/states/all/salt.states.file.html#operations-on-regular-files-special-files-directories-and-symlinks
Setup
Using either state:
or
Steps to Reproduce Issue
Use state included in "setup" and run highstate
Versions Report
Salt Version:
Salt: 2019.2.0
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.6.1
docker-py: Not Installed
gitdb: 2.0.3
gitpython: 2.1.8
ioflo: Not Installed
Jinja2: 2.10
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: 1.0.7
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.15rc1 (default, Nov 12 2018, 14:31:15)
python-gnupg: 0.4.1
PyYAML: 3.12
PyZMQ: 16.0.2
RAET: Not Installed
smmap: 2.0.3
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.2.5
System Versions:
dist: Ubuntu 18.04 bionic
locale: UTF-8
machine: x86_64
release: 4.15.0-46-generic
system: Linux
version: Ubuntu 18.04 bionic
The text was updated successfully, but these errors were encountered: