Petr Michalec | 7904774 | 2018-05-09 22:04:27 +0200 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | #set -x |
| 3 | |
| 4 | # setup |
| 5 | source /*.env |
| 6 | INVENTORY_BASE_URI=/tmp/kitchen/test/model/$MODEL |
| 7 | RECLASS=/tmp/kitchen |
| 8 | |
| 9 | # prereq |
| 10 | python -m ensurepip --default-pip |
| 11 | pip install pipenv |
| 12 | |
| 13 | # env |
| 14 | cd $RECLASS |
| 15 | pipenv --venv || pipenv install --python ${PYVER} |
| 16 | test -e /etc/reclsss || mkdir /etc/reclass |
| 17 | cp -avf $INVENTORY_BASE_URI/reclass-config* /etc/reclass |
| 18 | |
| 19 | # verify |
| 20 | for 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) |
| 22 | done |