Test puppet run
Some checks failed
CI / test (push) Failing after 3m29s
Lint / test (push) Successful in 42s

This commit is contained in:
Miguel Jacq 2026-06-16 16:47:47 +10:00
parent 380a0b8ca2
commit 3c84b3c070
Signed by: mig5
GPG key ID: 03906B4110AAD3B8

View file

@ -7,7 +7,8 @@ poetry run pytest -vvvv --cov=enroll --cov-report=term-missing --disable-warning
BUNDLE_DIR="/tmp/bundle"
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,
# to extend the manifests that will be linted later
@ -45,13 +46,22 @@ poetry run \
DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge cowsay
# No common roles mode (tested later)
poetry run \
poetry run \
enroll manifest \
--harvest "${BUNDLE_DIR}2" \
--out "${ANSIBLE_DIR}2" \
--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}"
# Lint
ansible-lint "${ANSIBLE_DIR}"