forked from Azure/ARO-RP
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
2,322 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
ARG REGISTRY | ||
ARG VERSION | ||
|
||
############################################################################### | ||
# ansible is the base Python image with ansible and azure-cli | ||
############################################################################### | ||
FROM ${REGISTRY}/ubi9/python-311:1-66 AS ansible | ||
# Versions | ||
# pipx https://pypi.org/project/pipx/#history | ||
# azure-cli https://pypi.org/project/azure-cli/#history | ||
# ansible https://pypi.org/project/ansible/#history | ||
# ansible.azcollection https://galaxy.ansible.com/ui/repo/published/azure/azcollection/ | ||
ARG PIPX_VERSION=1.6.0 \ | ||
ANSIBLE_VERSION=10.2.0 \ | ||
AZURE_CLI_VERSION=2.62.0 \ | ||
ANSIBLE_AZCOLLECTION_VERSION=2.3.0 | ||
|
||
# Have Ansible to print task timing information | ||
ENV ANSIBLE_CALLBACKS_ENABLED=profile_tasks | ||
USER root | ||
COPY ansible /ansible | ||
WORKDIR /ansible | ||
|
||
# Using pipx here because ansible and azure-cli have differing required core Azure modules | ||
# They each need a separate venv to avoid collisions | ||
RUN ${APP_ROOT}/bin/pip install "pipx==${PIPX_VERSION}" && \ | ||
${APP_ROOT}/bin/pipx install "azure-cli==${AZURE_CLI_VERSION}" && \ | ||
${APP_ROOT}/bin/pipx install "ansible==${ANSIBLE_VERSION}" --include-deps && \ | ||
${APP_ROOT}/bin/pipx runpip ansible install -r "/ansible/ansible-requirements.txt" && \ | ||
${HOME}/.local/bin/ansible-galaxy collection install "azure.azcollection==${ANSIBLE_AZCOLLECTION_VERSION}" && \ | ||
${APP_ROOT}/bin/pipx runpip ansible install -r "${HOME}/.ansible/collections/ansible_collections/azure/azcollection/requirements-azure.txt" && \ | ||
${APP_ROOT}/bin/pipx list && \ | ||
rm -rf ${HOME}/.ansible ${HOME}/.azure | ||
|
||
############################################################################### | ||
# linter takes the ansible image and injects ansible-lint. Ansible-lint needs | ||
# ansible itself and all ansible modules and python modules installed to correctly lint | ||
############################################################################### | ||
FROM ansible AS linter | ||
ARG ANSIBLE_LINT_VERSION=24.7.0 | ||
RUN ${APP_ROOT}/bin/pipx inject --include-apps ansible "ansible-lint==${ANSIBLE_LINT_VERSION}" && \ | ||
${HOME}/.local/bin/ansible-lint -v -c /ansible/.ansible_lint.yaml --project-dir /ansible --format sarif | tee /opt/app-root/src/sarif.txt | ||
|
||
############################################################################### | ||
# Final image is the base image plus ansible-lint's output | ||
############################################################################### | ||
FROM ansible | ||
COPY --from=linter /opt/app-root/src/sarif.txt /opt/app-root/src/sarif.txt | ||
ENTRYPOINT ["/opt/app-root/src/.local/bin/ansible-playbook"] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
profile: production | ||
exclude_paths: [] | ||
use_default_rules: true | ||
skip_list: | ||
- no-changed-when | ||
enable_list: | ||
- args | ||
- empty-string-compare | ||
- no-same-owner | ||
- name[prefix] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
kubernetes==29.0.0 | ||
microsoft-kiota-http==1.3.1 | ||
msal==1.28.1 | ||
msgraph-core==1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
delegation: localhost | ||
upgrade_paths: |
Oops, something went wrong.