Skip to content

Commit

Permalink
ansible 8.1.0 core 2.15.1, ansible-lint 6.17.2 (#68)
Browse files Browse the repository at this point in the history
add ansible-inventory entrypoint
  • Loading branch information
hemnstill authored Jun 25, 2023
1 parent ccde8c0 commit d142ed4
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ansible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
uses: ./.github/workflows/release.yml
with:
workflow: ${{ github.workflow }}
tool_version: '8.0.0'
tool_version: '8.1.0'
prepare_body: |
bsdtar -Oxf ./build-docker/build-docker.tar.gz build-docker.md >> body.md
bsdtar -Oxf ./build-gnu/build-gnu.tar.gz build-gnu.md >> body.md
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/poetry-1.5.1/total?label=⭳%20poetry-1.5.1)](https://github.com/hemnstill/StandaloneTools/releases/tag/poetry-1.5.1) | [![GitHub Repo stars](https://img.shields.io/github/stars/python-poetry/poetry?style=social&label=poetry)](https://github.com/python-poetry/poetry) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/python-poetry/poetry)](https://python-poetry.org/docs/) |
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/pylint-2.17.0/total?label=⭳%20pylint-2.17.0)](https://github.com/hemnstill/StandaloneTools/releases/tag/pylint-2.17.0) | [![GitHub Repo stars](https://img.shields.io/github/stars/PyCQA/pylint?style=social&label=pylint)](https://github.com/PyCQA/pylint) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/PyCQA/pylint)](https://pylint.pycqa.org/en/latest/) |
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/mypy-1.1.1/total?label=⭳%20mypy-1.1.1)](https://github.com/hemnstill/StandaloneTools/releases/tag/mypy-1.1.1) | [![GitHub Repo stars](https://img.shields.io/github/stars/python/mypy?style=social&label=mypy)](https://github.com/python/mypy) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/python/mypy)](https://mypy.readthedocs.io/en/latest/) |
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/ansible-8.0.0/total?label=⭳%20ansible-8.0.0-core-2.15.0)](https://github.com/hemnstill/StandaloneTools/releases/tag/ansible-8.0.0) | [![GitHub Repo stars](https://img.shields.io/github/stars/ansible/ansible?style=social&label=ansible)](https://github.com/ansible/ansible) [![PyPI](https://img.shields.io/pypi/v/ansible)](https://pypi.org/project/ansible/) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/ansible/ansible)](https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html) |
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/ansible-8.1.0/total?label=⭳%20ansible-8.1.0-core-2.15.1)](https://github.com/hemnstill/StandaloneTools/releases/tag/ansible-8.1.0) | [![GitHub Repo stars](https://img.shields.io/github/stars/ansible/ansible?style=social&label=ansible)](https://github.com/ansible/ansible) [![PyPI](https://img.shields.io/pypi/v/ansible)](https://pypi.org/project/ansible/) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/ansible/ansible)](https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html) |
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/bsdtar-3.6.2/total?label=⭳%20bsdtar-3.6.2)](https://github.com/hemnstill/StandaloneTools/releases/tag/bsdtar-3.6.2) | [![GitHub Repo stars](https://img.shields.io/github/stars/libarchive/libarchive?style=social&label=libarchive)](https://github.com/libarchive/libarchive) [![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/libarchive/libarchive)](https://github.com/libarchive/libarchive/releases/latest) |
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/pg_dump-15.1/total?label=⭳%20pg_dump-15.1)](https://github.com/hemnstill/StandaloneTools/releases/tag/pg_dump-15.1) | [![GitHub Repo stars](https://img.shields.io/github/stars/postgres/postgres?style=social&label=postgres)](https://github.com/postgres/postgres) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/postgres/postgres)](https://www.postgresql.org/docs/current/index.html) |
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/busybox-1.35.0-FRP-4784/total?label=⭳%20busybox-1.35.0-FRP-4784)](https://github.com/hemnstill/StandaloneTools/releases/tag/busybox-1.35.0-FRP-4784) | [![GitHub Repo stars](https://img.shields.io/github/stars/rmyorston/busybox-w32?style=social&label=busybox-w32)](https://github.com/rmyorston/busybox-w32) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/rmyorston/busybox-w32)](https://frippery.org/busybox/release-notes/current.html) |
Expand Down
10 changes: 8 additions & 2 deletions ansible/build_gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ apk add --no-cache alpine-sdk python3-dev bash
export LC_ALL=en_US.UTF-8

tool_name="ansible"
tool_version="8.0.0"
tool_lint_version="6.17.1"
tool_version="8.1.0"
tool_lint_version="6.17.2"
python_self_name="python-3.11.3"
self_name="$tool_name-$tool_version"
release_version_dirpath="$dp0/release/$self_name"
Expand Down Expand Up @@ -51,6 +51,9 @@ cp -f "$dp0/release/ansible-config" "$release_version_dirpath/Scripts/bin/"
cp -f "$dp0/release/__main__ansible-playbook.py" "$release_version_dirpath/"
cp -f "$dp0/release/ansible-playbook" "$release_version_dirpath/Scripts/bin/"

cp -f "$dp0/release/__main__ansible-inventory.py" "$release_version_dirpath/"
cp -f "$dp0/release/ansible-inventory" "$release_version_dirpath/Scripts/bin/"

cp -f "$dp0/release/__main__ansible-galaxy.py" "$release_version_dirpath/"
cp -f "$dp0/release/ansible-galaxy" "$release_version_dirpath/Scripts/bin/"

Expand Down Expand Up @@ -84,9 +87,12 @@ cd "$release_version_dirpath"
%s
%s
' "$("./Scripts/bin/$tool_name" --version)" \
"$("./Scripts/bin/ansible-config" --version | head -1)" \
"$("./Scripts/bin/ansible-playbook" --version | head -1)" \
"$("./Scripts/bin/ansible-inventory" --version | head -1)" \
"$("./Scripts/bin/ansible-galaxy" --version | head -1)" \
"$("./Scripts/bin/ansible-lint" --version | head -1)" \
"$("./Scripts/bin/ansible-test" --version | head -1)" \
Expand Down
8 changes: 8 additions & 0 deletions ansible/release/__main__ansible-inventory.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -*- coding: utf-8 -*-
import re
import sys
from ansible.cli.inventory import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())

3 changes: 3 additions & 0 deletions ansible/release/ansible-inventory
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
dp0="$(dirname "$(readlink -f "$0")")"
"$dp0/python3" "$dp0/../../__main__ansible-inventory.py" "$@"
2 changes: 1 addition & 1 deletion ansible/test_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test_ansible_galaxy_version() {
}

test_ansible_lint_version() {
assertEquals "ansible-lint 6.17.0 using ansible-core:2.14.5 ruamel-yaml:0.17.32 ruamel-yaml-clib:0.2.7" "$(docker run --rm $image_name ansible-lint --version | head -1)"
assertEquals "ansible-lint 6.17.2 using ansible-core:2.14.5 ansible-compat:4.0.4 ruamel-yaml:0.17.32 ruamel-yaml-clib:0.2.7" "$(docker run --rm $image_name ansible-lint --version | head -1)"
}

# Load and run shUnit2.
Expand Down
20 changes: 12 additions & 8 deletions ansible/test_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if [[ "$is_ubuntu_os" == true ]]; then
fi

test_version() {
assertEquals "ansible [core 2.15.0]
assertEquals "ansible [core 2.15.1]
config file = None
configured module search path = ['/github/home/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /__w/StandaloneTools/StandaloneTools/bin/Scripts/lib/python3.11/site-packages/ansible
Expand All @@ -30,31 +30,35 @@ test_version() {
}

test_bin_version() {
assertEquals "ansible [core 2.15.0]" "$(../bin/Scripts/bin/ansible --version | head -1)"
assertEquals "ansible [core 2.15.1]" "$(../bin/Scripts/bin/ansible --version | head -1)"
}

test_ansible_config_version() {
assertEquals "ansible-config [core 2.15.0]" "$(../bin/Scripts/bin/ansible-config --version | head -1)"
assertEquals "ansible-config [core 2.15.1]" "$(../bin/Scripts/bin/ansible-config --version | head -1)"
}

test_ansible_playbook_version() {
assertEquals "ansible-playbook [core 2.15.0]" "$(../bin/Scripts/bin/ansible-playbook --version | head -1)"
assertEquals "ansible-playbook [core 2.15.1]" "$(../bin/Scripts/bin/ansible-playbook --version | head -1)"
}

test_ansible_inventory_version() {
assertEquals "ansible-inventory [core 2.15.1]" "$(../bin/Scripts/bin/ansible-inventory --version | head -1)"
}

test_ansible_galaxy_version() {
assertEquals "ansible-galaxy [core 2.15.0]" "$(../bin/Scripts/bin/ansible-galaxy --version | head -1)"
assertEquals "ansible-galaxy [core 2.15.1]" "$(../bin/Scripts/bin/ansible-galaxy --version | head -1)"
}

test_ansible_lint_version() {
assertEquals "ansible-lint 6.17.1 using ansible-core:2.15.0 ruamel-yaml:0.17.32 ruamel-yaml-clib:0.2.7" "$(../bin/Scripts/bin/ansible-lint --version | head -1)"
assertEquals "ansible-lint 6.17.2 using ansible-core:2.15.1 ansible-compat:4.1.2 ruamel-yaml:0.17.32 ruamel-yaml-clib:0.2.7" "$(../bin/Scripts/bin/ansible-lint --version | head -1)"
}

test_ansible_test_version() {
assertEquals "ansible-test version 2.15.0" "$(../bin/Scripts/bin/ansible-test --version | head -1)"
assertEquals "ansible-test version 2.15.1" "$(../bin/Scripts/bin/ansible-test --version | head -1)"
}

test_ansible_doc_version() {
assertEquals "ansible-doc [core 2.15.0]" "$(../bin/Scripts/bin/ansible-doc --version | head -1)"
assertEquals "ansible-doc [core 2.15.1]" "$(../bin/Scripts/bin/ansible-doc --version | head -1)"
}

# Load and run shUnit2.
Expand Down

0 comments on commit d142ed4

Please sign in to comment.