blob: fb3addedb8612cb11c6dd6f001d20cdff9097344 [file] [log] [blame]
Petr Michalec79047742018-05-09 22:04:27 +02001#!/bin/bash
2#set -x
3
4# setup
5source /*.env
6INVENTORY_BASE_URI=/tmp/kitchen/test/model/$MODEL
7RECLASS=/tmp/kitchen
8
9# prereq
10python -m ensurepip --default-pip
11pip install pipenv
12
13# env
14cd $RECLASS
15pipenv --venv || pipenv install --python ${PYVER}
16test -e /etc/reclsss || mkdir /etc/reclass
17cp -avf $INVENTORY_BASE_URI/reclass-config* /etc/reclass
18
19# verify
20for n in $(ls $INVENTORY_BASE_URI/nodes/*|sort); do
21 pipenv run python${PYVER} ./reclass.py --inventory-base-uri=$INVENTORY_BASE_URI --nodeinfo $(basename $n .yml)
22done