salt.pillar.git_pillar

Clone a remote git repository and use the filesystem as a pillar directory.

This external pillar source can be configured in the master config file like so:

ext_pillar:
  - git: master git://gitserver/git-pillar.git

Note that this is not the same thing as configuring pillar data using the pillar_roots parameter. The branch referenced in the ext_pillar entry above (master), would evaluate to the base environment, so this branch needs to contain a top.sls with a base section in it, like this:

base:
  '*':
    - foo

To use other environments from the same git repo as git_pillar sources, just add additional lines, like so:

ext_pillar:
  - git: master git://gitserver/git-pillar.git
  - git: dev git://gitserver/git-pillar.git

In this case, the dev branch would need its own top.sls with a dev section in it, like this:

dev:
  '*':
    - bar
salt.pillar.git_pillar.envs(branch, repo_location)

Return a list of refs that can be used as environments

salt.pillar.git_pillar.ext_pillar(minion_id, pillar, repo_string)

Execute a command and read the output as YAML

salt.pillar.git_pillar.init(branch, repo_location)

Return the git repo object for this session

salt.pillar.git_pillar.update(branch, repo_location)

Ensure you are on the right branch, and execute a git pull

return boolean whether it worked

Current Salt release: 0.17.1

Previous topic

salt.pillar.django_orm

Next topic

salt.pillar.hiera

SaltConf - Jan 28-30 2014

Upcoming SaltStack Events