summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2025-08-11 00:33:36 +0200
committerAhmed Abdelhalim <[email protected]>2025-08-11 00:33:36 +0200
commita36d4c2e61f2aaf9765bf4e9f8f0669707c54e48 (patch)
treedcb01e1df4adae5beae1a410ec03687766c4fce2
parentc1acabda96b040f25285dfe263e1154d7e9d70ac (diff)
Add testing with configure playbooks
-rw-r--r--.github/workflows/ci.yml21
-rw-r--r--molecule/default/converge.yml2
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"