Move influxdata repo to separate file
diff --git a/.kitchen.yml b/.kitchen.yml
index 3f7ad13..2e338c4 100644
--- a/.kitchen.yml
+++ b/.kitchen.yml
@@ -17,12 +17,16 @@
state_top:
base:
"*":
+ - linux
- influxdb
pillars:
top.sls:
base:
"*":
+ - linux_repo_influxdata
- influxdb
+ pillars-from-files:
+ linux_repo_influxdata.sls: tests/pillar/repo_influxdata.sls
dependencies:
- name: linux
repo: git
diff --git a/influxdb/server.sls b/influxdb/server.sls
index 0be829f..30899fc 100644
--- a/influxdb/server.sls
+++ b/influxdb/server.sls
@@ -1,15 +1,7 @@
{%- from "influxdb/map.jinja" import server with context %}
-{% from "linux/map.jinja" import system with context %}
{%- if server.enabled %}
-linux_packages:
- pkg.installed:
- - pkgs: {{ system.pkgs }}
-
-include:
- - linux.system.repo
-
influxdb_packages:
pkg.installed:
- names: {{ server.pkgs }}
diff --git a/tests/pillar/cluster.sls b/tests/pillar/cluster.sls
index 2de3ef4..e5717ff 100644
--- a/tests/pillar/cluster.sls
+++ b/tests/pillar/cluster.sls
@@ -23,11 +23,3 @@
port: 8091
- host: idb03.local
port: 8091
-linux:
- system:
- enabled: true
- repo:
- docker:
- source: 'deb https://repos.influxdata.com/ubuntu {{ grains.get('oscodename') }} stable'
- key_url: https://repos.influxdata.com/influxdb.key
- file: /etc/apt/sources.list
diff --git a/tests/pillar/repo_influxdata.sls b/tests/pillar/repo_influxdata.sls
new file mode 100644
index 0000000..9599f02
--- /dev/null
+++ b/tests/pillar/repo_influxdata.sls
@@ -0,0 +1,8 @@
+linux:
+ system:
+ enabled: true
+ repo:
+ linux_influxdata:
+ source: "deb https://repos.influxdata.com/ubuntu {{ grains.get('oscodename') }} stable"
+ architectures: amd64
+ key_url: "https://repos.influxdata.com/influxdb.key"
diff --git a/tests/pillar/single.sls b/tests/pillar/single.sls
index c6a9124..21c12b0 100644
--- a/tests/pillar/single.sls
+++ b/tests/pillar/single.sls
@@ -1,11 +1,3 @@
influxdb:
server:
enabled: true
-linux:
- system:
- enabled: true
- repo:
- docker:
- source: 'deb https://repos.influxdata.com/ubuntu {{ grains.get('oscodename') }} stable'
- key_url: https://repos.influxdata.com/influxdb.key
- file: /etc/apt/sources.list
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 3f42101..a4cac88 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -18,7 +18,7 @@
SALT_CONFIG_DIR=${SALT_CONFIG_DIR:-${BUILDDIR}/salt}
SALT_CACHE_DIR=${SALT_CACHE_DIR:-${SALT_CONFIG_DIR}/cache}
-SALT_OPTS="${SALT_OPTS} --retcode-passthrough --local -c ${SALT_CONFIG_DIR}"
+SALT_OPTS="${SALT_OPTS} --retcode-passthrough --local -c ${SALT_CONFIG_DIR} --log-file=/dev/null"
if [ "x${SALT_VERSION}" != "x" ]; then
PIP_SALT_VERSION="==${SALT_VERSION}"
@@ -44,6 +44,7 @@
[ ! -d ${SALT_PILLAR_DIR} ] && mkdir -p ${SALT_PILLAR_DIR}
echo "base:" > ${SALT_PILLAR_DIR}/top.sls
for pillar in ${PILLARDIR}/*; do
+ grep ${FORMULA_NAME}: ${pillar} &>/dev/null || continue
state_name=$(basename ${pillar%.sls})
echo -e " ${state_name}:\n - ${state_name}" >> ${SALT_PILLAR_DIR}/top.sls
done
@@ -56,6 +57,7 @@
echo "base:" > ${SALT_FILE_DIR}/top.sls
for pillar in ${PILLARDIR}/*.sls; do
+ grep ${FORMULA_NAME}: ${pillar} &>/dev/null || continue
state_name=$(basename ${pillar%.sls})
echo -e " ${state_name}:\n - ${FORMULA_NAME}" >> ${SALT_FILE_DIR}/top.sls
done
@@ -64,6 +66,7 @@
file_client: local
cachedir: ${SALT_CACHE_DIR}
verify_env: False
+minion_id_caching: False
file_roots:
base:
@@ -125,6 +128,7 @@
run() {
for pillar in ${PILLARDIR}/*.sls; do
+ grep ${FORMULA_NAME}: ${pillar} &>/dev/null || continue
state_name=$(basename ${pillar%.sls})
salt_run --id=${state_name} state.show_sls ${FORMULA_NAME} || (log_err "Execution of ${FORMULA_NAME}.${state_name} failed"; exit 1)
done