From a36d4c2e61f2aaf9765bf4e9f8f0669707c54e48 Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Mon, 11 Aug 2025 00:33:36 +0200 Subject: Add testing with configure playbooks --- .github/workflows/ci.yml | 21 ++++++++++++++++++--- molecule/default/converge.yml | 2 +- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9a781d..80eaacc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,20 +37,35 @@ jobs: runs-on: ${{ matrix.molecule_distro.runs_on }} steps: - uses: actions/checkout@v4 + with: + repository: "a14m/ansible-distro-install" + path: "ansible-distro-install" + - uses: actions/checkout@v4 + with: + repository: "a14m/ansible-distro-configure" + path: "ansible-distro-configure" - uses: actions/setup-python@v5 with: python-version: "3.x" - name: Install dependencies run: pip3 install ansible molecule molecule-plugins[docker] - - name: Copy example files + - name: Copy distro install example files run: | - # Copy host_vars (from the .example files) - for f in host_vars/*.example; do cp "$f" "$(echo "$f" | sed s/\.example//)"; done + # Use example files for testing instead of encrypted files + cd ansible-distro-install && + for f in host_vars/*.example; do mv "$f" "$(echo "$f" | sed s/\.example//)"; done + - name: Copy distro configure example files + run: | + # Use example files for testing instead of encrypted files + cd ansible-distro-configure && + for f in group_vars/*.example; do mv "$f" "$(echo "$f" | sed s/\.example//)"; done && + for f in host_vars/*.example; do mv "$f" "$(echo "$f" | sed s/\.example//)"; done - name: Run env: PY_COLORS: 1 ANSIBLE_FORCE_COLOR: 1 run: >- + cd ansible-distro-install && molecule --version && ansible --version && MOLECULE_COMMAND=${{ matrix.molecule_distro.command }} diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index 3e3232a..75790b7 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -35,7 +35,7 @@ dev: "{{ partition_disk }}p3" mount_path: "/mnt" partition_extras: [] - # configure_playbook_dir: "../../../ansible-distro-configure" + configure_playbook_dir: "../../../ansible-distro-configure" pre_tasks: - name: "Get test facts" -- cgit v1.2.3