salt
salt copied to clipboard
Windows minion: contents of file not getting added when using file.manage
When running a state file containing file.manage contents are not getting added. The file, stuff1.txt gets created, however. Using Salt v2014.7.0.
Here is the state file:
my_file:
file.managed:
- name: c:\temp\stuff1.txt
- content: 'hello and a few other things world'
Here is the command and output:
# salt Win state.sls testnodrive
Win:
----------
ID: my_file
Function: file.managed
Name: c:\temp\stuff1.txt
Result: True
Comment: Empty file
Started: 18:55:18.154000
Duration: 0.0 ms
Changes:
----------
new:
file c:\temp\stuff1.txt created
Summary
------------
Succeeded: 1 (changed=1)
Failed: 0
------------
Total states run: 1
Versions report:
# salt --versions-report
Salt: 2014.7.0
Python: 2.7.6 (default, Mar 22 2014, 22:59:56)
Jinja2: 2.7.2
M2Crypto: 0.21.1
msgpack-python: 0.3.0
msgpack-pure: Not Installed
pycrypto: 2.6.1
libnacl: Not Installed
PyYAML: 3.10
ioflo: Not Installed
PyZMQ: 14.0.1
RAET: Not Installed
ZMQ: 4.0.4
Mako: Not Installed
Windows minion version:

Figured out the problem. State file needed contents (plural) as opposed to content
Closing