Test puppet run
This commit is contained in:
parent
380a0b8ca2
commit
3c84b3c070
1 changed files with 13 additions and 3 deletions
16
tests.sh
16
tests.sh
|
|
@ -7,7 +7,8 @@ poetry run pytest -vvvv --cov=enroll --cov-report=term-missing --disable-warning
|
||||||
|
|
||||||
BUNDLE_DIR="/tmp/bundle"
|
BUNDLE_DIR="/tmp/bundle"
|
||||||
ANSIBLE_DIR="/tmp/ansible"
|
ANSIBLE_DIR="/tmp/ansible"
|
||||||
rm -rf "${BUNDLE_DIR}" "${ANSIBLE_DIR}"
|
PUPPET_DIR="/tmp/puppet"
|
||||||
|
rm -rf "${BUNDLE_DIR}" "${ANSIBLE_DIR}" "${PUPPET_DIR}"
|
||||||
|
|
||||||
# Install something that has symlinks like apache2,
|
# Install something that has symlinks like apache2,
|
||||||
# to extend the manifests that will be linted later
|
# to extend the manifests that will be linted later
|
||||||
|
|
@ -45,13 +46,22 @@ poetry run \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge cowsay
|
DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge cowsay
|
||||||
|
|
||||||
# No common roles mode (tested later)
|
# No common roles mode (tested later)
|
||||||
poetry run \
|
poetry run \
|
||||||
enroll manifest \
|
enroll manifest \
|
||||||
--harvest "${BUNDLE_DIR}2" \
|
--harvest "${BUNDLE_DIR}2" \
|
||||||
--out "${ANSIBLE_DIR}2" \
|
--out "${ANSIBLE_DIR}2" \
|
||||||
--no-common-roles
|
--no-common-roles
|
||||||
|
|
||||||
# Ansible test
|
# Puppet mode!
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -y puppet
|
||||||
|
poetry run \
|
||||||
|
enroll single-shot \
|
||||||
|
--harvest "${BUNDLE_DIR}3" \
|
||||||
|
--out "${PUPPET_DIR}3" \
|
||||||
|
--target puppet
|
||||||
|
sudo puppet apply --modulepath "${PUPPET_DIR}3/modules" "${PUPPET_DIR}3/manifests/site.pp" --noop
|
||||||
|
|
||||||
|
# Ansible mode!
|
||||||
builtin cd "${ANSIBLE_DIR}"
|
builtin cd "${ANSIBLE_DIR}"
|
||||||
# Lint
|
# Lint
|
||||||
ansible-lint "${ANSIBLE_DIR}"
|
ansible-lint "${ANSIBLE_DIR}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue