I am running the command
salt-ssh 'my-vm' file.manage_file /home/file.txt '' '{}' salt://file.txt '{}' root root '700' '' myenv ''
But i get the following error message
comment: Source file 'salt://file.txt' not found
N.B that when putting this in a state file and running apply state there is no error and the file is placed on my-vm as expected
Salt master has the configuration
file_roots:
myenv:
- /srv/salt/states/base
and my file.txt lives in
/srv/salt/states/base/file.txt
file.manage_fileis an execution function, not a state, and not designed for direct use. For example, it requiresfile.get_managedto have been called first.To manage a single file from the command line, use the
state.singlefunction: