Skip to content

Instantly share code, notes, and snippets.

@pysysops
Created September 30, 2019 11:06
Show Gist options
  • Save pysysops/83665a574f93770e1b3c79aa81dc9947 to your computer and use it in GitHub Desktop.
Save pysysops/83665a574f93770e1b3c79aa81dc9947 to your computer and use it in GitHub Desktop.
xterrafile for Saltstack formulas
# Sometimes you want to package up and deploy your code as an rpm, deb, tar.gz...
# You want to be sure that your Saltstack formulas are version controlled and easily updateable.
# XTerrafile can help you do that.
# Create a "Saltfile" (it's just a YAML file and can be named anything. Example:
salt-formula-linux:
source: "https://github.com/salt-formulas/salt-formula-linux.git"
version: "72507a1b25fce6f7ec0d9532129a1619c3646927"
salt-formula-jenkins:
source: "https://github.com/salt-formulas/salt-formula-jenkins.git"
version: "2017.8"
ufw-formula:
source: "https://github.com/saltstack-formulas/ufw-formula.git"
version: "1ba6c9b615a2482e6f1df3685e8e8798d95d245e"
salt-formula-sensu:
source: "https://github.com/salt-formulas/salt-formula-sensu.git"
version: "e397f8454b51d26174deb3670420d43ddff0b5ac"
salt-formula:
source: "https://github.com/saltstack-formulas/salt-formula.git"
version: "764d9eef6d5c9a7edbf47377d299119acab8be04"
users-formula:
source: "https://github.com/saltstack-formulas/users-formula.git"
version: "b8c6844e1000f8977e1c3a5fcc096914950f5a5d"
openssh-formula:
source: "https://github.com/saltstack-formulas/openssh-formula.git"
version: "3715cd601ca4d15e7d76021ec2b61edf38bffd0d"
docker-formula:
source: "https://github.com/pysysops/docker-formula.git"
version: "fix_pkrepo_indentation"
# Versions can be tags, commit sha's, branches. Sources can be files on S3, Git repos, local folders.
# Run xterrafile to pull down formulas:
xterrafile -f Saltfile -d /srv/formulas install
# This will place all of the formulas at: /srv/formulas
# Add the directory to your file_roots like:
file_roots:
base:
- /srv/saltstack/salt
- /srv/saltstack/local-formulas
- /srv/saltstack/formulas/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment