From 73e9342004f14c11c63b0db6143c025e0e727b1e Mon Sep 17 00:00:00 2001 From: Elijah Lazkani Date: Fri, 3 Mar 2017 23:10:12 -0500 Subject: [PATCH] Bundling the grains generation in a script for Travis --- .travis.yml | 4 ++-- .travis/grains.sh | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .travis/grains.sh diff --git a/.travis.yml b/.travis.yml index a111df1..b9cdca0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ install: # Copy these states - sudo mkdir -p /srv/salt/states - sudo cp -r salty/base/* /srv/salt/states - - sudo cp .travis/minion /etc/salt/minion + - sudo cp -r .travis/* /etc/salt/ - sudo service salt-minion restart # Additional debug help @@ -19,7 +19,7 @@ install: # See what kind of travis box you're on # to help with making your states compatible with travis - #- sudo salt-call --local --config=./ --state-output=changes grains.setvals "{ \"user\": \"$(whoami)\", \"group\": \"$(id -g -n $(whoami))\", \"homedir\": \"$HOME\" }" + - sudo sh grains.sh script: - sudo salt-call --local --config=./ --state-output=changes --log-level=quiet state.apply diff --git a/.travis/grains.sh b/.travis/grains.sh new file mode 100644 index 0000000..992ae46 --- /dev/null +++ b/.travis/grains.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +sudo salt-call --local --config=./ --state-output=changes grains.setvals "{ \"user\": \"$(whoami)\", \"group\": \"$(id -g -n $(whoami))\", \"homedir\": \"$home\" }"