From cf74863a5eb90e4d34df178a608321bade017f99 Mon Sep 17 00:00:00 2001 From: oval Date: Tue, 7 Jul 2026 18:49:40 +0000 Subject: [PATCH] =?UTF-8?q?Update=20Dockerfile.ansible=20=E2=80=94=20conta?= =?UTF-8?q?iner=20web=20UI=20with=20JSON/MD/PDF=20export?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile.ansible | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/Dockerfile.ansible b/Dockerfile.ansible index 61ea3e5..aa33d97 100644 --- a/Dockerfile.ansible +++ b/Dockerfile.ansible @@ -67,7 +67,8 @@ RUN pip3 install --no-cache-dir --break-system-packages \ xmltodict>=0.13 \ pyyaml>=6.0 \ cryptography>=41.0 \ - packaging + packaging \ + fpdf2>=2.7 # ── Ansible collections ────────────────────────────────── RUN ansible-galaxy collection install \ @@ -113,11 +114,16 @@ control_path = /tmp/ansible-%%h-%%p-%%r' \ RUN mkdir -p /ansible/playbooks /ansible/inventory WORKDIR /ansible +# ── Container web UI (JSON / Markdown / PDF export) ────── +COPY webui/container-app.py /usr/local/bin/container-webui.py +COPY reports/render_report.py /ansible/reports/render_report.py +RUN chmod +x /usr/local/bin/container-webui.py + # ── Default inventory (placeholder) ─────────────────────── RUN printf '[windows]\n\ -[cisc o_asa]\n\ -[cisc o_ios]\n\ -[cisc o_nxos]\n\ +[cisco_asa]\n\ +[cisco_ios]\n\ +[cisco_nxos]\n\ [vmware]\n\ [mssql]\n\ [linux]\n\ @@ -126,6 +132,10 @@ RUN printf '[windows]\n\ ansible_user=ansible\n' \ > /ansible/inventory/inventory.ini -# ── Entrypoint: run ansible-playbook by default ─────────── -ENTRYPOINT ["ansible-playbook"] -CMD ["--help"] +# ── Entrypoint: web UI by default, ansible-playbook if args ─ +# docker run -p 8080:8080 ansible-node → web UI +# docker run ansible-node site.yml -i hosts → ansible-playbook +COPY scripts/entrypoint.sh /usr/local/bin/entrypoint.sh +RUN chmod +x /usr/local/bin/entrypoint.sh +ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] +CMD []