I've setup git on an nfs server. The salt master auto-mounts the folder containing the git repository on boot. I have copied .sls files, templates and scripts to the git directory and added them to git.
I have added the following to the master config file, according to the guide here:
fileserver_backend:
- git
gitfs_remotes:
- file:///mnt/git-repo
I am in doubt about what to set file_roots to, but have tried both
- /srv/salt
and
- /mnt/git-repo
with same result: "No Top file or external nodes data matches found"
SaltStack version is 0.17.4, OS is SLES 11.2.
Does anyone know where I have gone wrong?
Cloning the repository gave the following message "Warning: You appear to have cloned an empty repository". (thanks @Jason Zhu) It did this because although the files were added to the repository, they were not committed.
To solve the problem I:
removed file_roots from the master config file, since it is not needed when you use gitfs (thanks @basepi)
restarted the salt-master, to enforce changes to master config file (thanks @Utah_Dave)
committed the added files to the repository