From 3c84b3c0700c9cdc4e1e1c25093ba3fc5f2bcd6e Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Tue, 16 Jun 2026 16:47:47 +1000 Subject: [PATCH] Test puppet run --- tests.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tests.sh b/tests.sh index 2435b6a..b9e964b 100755 --- a/tests.sh +++ b/tests.sh @@ -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}"