Questions tagged [gitfs]

A git-based backend for SaltStack

GitFS is a fileserver backend for [SaltStack] based on a git repositories. To the standard filesystem storage it provides the advantage of being able to use git's versioning mechanism easily for the files server by SaltStack's builtin fileserver.

13 questions
4
votes
1 answer

How to make saltstack retrieve states from multiple branches in gitfs

I have several computers managed by the Saltstack that are used both for production and development. These PCs are our internal servers and purpose of using Saltstack is (1) to backup settings for quickly reapplying them in case of failures (2)…
wl2776
  • 4,099
  • 4
  • 35
  • 77
2
votes
1 answer

Giving ssh credentials for salt backend with gitfs in vagrant box

I use vagrant to test my salt configs. On one box I have a vagrant salt master and salt minion and on another box I have a salt minion. I'm trying to switch over to use gitfs to fetch backend from my private repo. This is my…
mecavity
  • 31
  • 4
2
votes
2 answers

SaltStack and GitFS - No Top file or external nodes data matches found

Here is my /etc/salt/master config: #GitFS gitfs_provider: pygit2 gitfs_base: DEVELOPMENT gitfs_env_whitelist: - base fileserver_backend: - git gitfs_remotes: - ssh://git@github.com/myrepo/salt-states.git: - pubkey: /root/.ssh/my.pub …
Kryten
  • 595
  • 3
  • 10
  • 25
2
votes
1 answer

Saltstack gitfs - how to retrieve git commit hash?

Gitfs (dulwich) is configured as fileserver-backend in our saltstack with only one gitfs_remotes. I want to be able to retrieve the current git commit hash from the Gitfs when I run salt on the master so I can keep a log of which git commit is run…
heatherz
  • 156
  • 1
  • 4
2
votes
6 answers

"No Top file or external nodes data matches found" setting up gitfs with SaltStack

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…
Marmoy
  • 8,009
  • 7
  • 46
  • 74
1
vote
1 answer

Saltstack update all minions highstate once gitfs remote changed

I am struggling to implement a reactor (or any other method) to have all my minions updated once the salt master gitfs configured remote has changed (so when a commit has been pushed/merged into the branch the salt master is monitoring) So far I…
tvb
  • 783
  • 1
  • 10
  • 21
1
vote
1 answer

Importing python-pygit2 correctly on RHEL7.2 (For use in SaltStack gitfs)

I'm trying to setup gitfs for SaltStack, using the pygit2 method. I've installed pygit2 and libgit2 on my machine: [root@r9tvap1109 site-packages]# yum list installed | grep git2 libgit2.x86_64 0.21.5-1.el7 …
0
votes
0 answers

How to maintain a git branch as a directory which is always up-to-date?

I have a git repository, and I would like other users to be able to read (only) any file of the master branch without having to run git clone. One option is to mount the repository with gitfs. Is there any better option? Is there a reason to avoid…
Yariv
  • 381
  • 3
  • 11
0
votes
2 answers

how to handle import of files using Jinja that don't exist

In Salt Pillars I need to load the contents of a file into a Jinja variable. If the file doesn't exist Jinja throws an error (TemplateNotFound:...) I have some folders (Company A, Company B, etc) in my Pillars that may or may not contain a file…
0
votes
1 answer

Not able to execute embedded Saltstack state using gitfs

I am working with the "gitfs" feature of SaltStack in order to execute a state file. The state file uses the "include" feature to embed other two state files from the repository. My repository has the following hierarchy: salt - dir1 …
shrikant
  • 23
  • 3
0
votes
2 answers

gitfs_remotes in salt, how to reference properly in the sls file? file is served but cant reference

I am having a dilemma that salt documentation cant help me solve. I am trying to to get a file from a git repo and than manage file in the sls. I have configured the master in the following way: gitfs_provider: pygit2 fileserver_backend: - git -…
Vit Dolphin
  • 73
  • 12
0
votes
1 answer

Saltstack "Malformed topfile" with GitFS

I'm trying to get Saltstack working with GitFS integration on Debian Squeeze. Salt master and minions are running and GitFS works via GitPython (pip install 'GitPython==0.3.2.RC1'). Issue: I receive the error message Malformed topfile (state…
Enrico Stahn
  • 2,967
  • 1
  • 23
  • 23
0
votes
1 answer

Gitfs remote state not recognized on highstate

I have a remote state called logstash_forwarder that is located at https://github.com/saltstack-formulas/logstash_forwarder-formula.git. Im using git as fileserver_backend. When I run state.highstate, it does not find the state. When I run state.sls…
Mike Stan
  • 1
  • 1