diff --git a/.ostree/get_ostree_data.sh b/.ostree/get_ostree_data.sh index cec08b0c..65830d6b 100755 --- a/.ostree/get_ostree_data.sh +++ b/.ostree/get_ostree_data.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail @@ -28,7 +28,7 @@ if [ "$pkgtype" = testing ]; then fi get_rolepath() { - local ostree_dir role rolesdir roles_parent_dir coll_path pth + local ostree_dir role rolesdir roles_parent_dir coll_path path ostree_dir="$1" role="$2" roles_parent_dir="$(dirname "$(dirname "$ostree_dir")")" @@ -51,8 +51,8 @@ get_rolepath() { coll_path="${ANSIBLE_COLLECTIONS_PATHS:-}" fi if [ -n "${coll_path}" ]; then - for pth in ${coll_path//:/ }; do - for rolesdir in "$pth"/ansible_collections/*/*_system_roles/roles/"$role"/.ostree; do + for path in ${coll_path//:/ }; do + for rolesdir in "$path"/ansible_collections/*/*_system_roles/roles/"$role"/.ostree; do if [ -d "$rolesdir" ]; then echo "$rolesdir" return 0 diff --git a/.sanity-ansible-ignore-2.10.txt b/.sanity-ansible-ignore-2.10.txt index 832180ba..b791db6d 100644 --- a/.sanity-ansible-ignore-2.10.txt +++ b/.sanity-ansible-ignore-2.10.txt @@ -25,4 +25,3 @@ tests/storage/scripts/generate_tests.py future-import-boilerplate!skip tests/storage/scripts/generate_tests.py shebang!skip tests/storage/scripts/post-commit shebang!skip tests/storage/scripts/pre-commit shebang!skip -roles/storage/.ostree/get_ostree_data.sh shebang!skip diff --git a/.sanity-ansible-ignore-2.11.txt b/.sanity-ansible-ignore-2.11.txt index 2a7911b9..0ea9c17d 100644 --- a/.sanity-ansible-ignore-2.11.txt +++ b/.sanity-ansible-ignore-2.11.txt @@ -26,4 +26,3 @@ tests/storage/scripts/generate_tests.py future-import-boilerplate!skip tests/storage/scripts/generate_tests.py shebang!skip tests/storage/scripts/post-commit shebang!skip tests/storage/scripts/pre-commit shebang!skip -roles/storage/.ostree/get_ostree_data.sh shebang!skip diff --git a/.sanity-ansible-ignore-2.12.txt b/.sanity-ansible-ignore-2.12.txt index 8dd88b1d..2bbb920f 100644 --- a/.sanity-ansible-ignore-2.12.txt +++ b/.sanity-ansible-ignore-2.12.txt @@ -41,4 +41,3 @@ plugins/module_utils/storage_lsr/size.py pylint!skip tests/storage/scripts/generate_tests.py shebang!skip tests/storage/scripts/post-commit shebang!skip tests/storage/scripts/pre-commit shebang!skip -roles/storage/.ostree/get_ostree_data.sh shebang!skip diff --git a/.sanity-ansible-ignore-2.13.txt b/.sanity-ansible-ignore-2.13.txt index 8dd88b1d..2bbb920f 100644 --- a/.sanity-ansible-ignore-2.13.txt +++ b/.sanity-ansible-ignore-2.13.txt @@ -41,4 +41,3 @@ plugins/module_utils/storage_lsr/size.py pylint!skip tests/storage/scripts/generate_tests.py shebang!skip tests/storage/scripts/post-commit shebang!skip tests/storage/scripts/pre-commit shebang!skip -roles/storage/.ostree/get_ostree_data.sh shebang!skip diff --git a/.sanity-ansible-ignore-2.14.txt b/.sanity-ansible-ignore-2.14.txt index e7ae90e4..0e98e9af 100644 --- a/.sanity-ansible-ignore-2.14.txt +++ b/.sanity-ansible-ignore-2.14.txt @@ -38,4 +38,3 @@ plugins/module_utils/storage_lsr/size.py pylint!skip tests/storage/scripts/generate_tests.py shebang!skip tests/storage/scripts/post-commit shebang!skip tests/storage/scripts/pre-commit shebang!skip -roles/storage/.ostree/get_ostree_data.sh shebang!skip diff --git a/.sanity-ansible-ignore-2.15.txt b/.sanity-ansible-ignore-2.15.txt index e7ae90e4..0e98e9af 100644 --- a/.sanity-ansible-ignore-2.15.txt +++ b/.sanity-ansible-ignore-2.15.txt @@ -38,4 +38,3 @@ plugins/module_utils/storage_lsr/size.py pylint!skip tests/storage/scripts/generate_tests.py shebang!skip tests/storage/scripts/post-commit shebang!skip tests/storage/scripts/pre-commit shebang!skip -roles/storage/.ostree/get_ostree_data.sh shebang!skip diff --git a/.sanity-ansible-ignore-2.9.txt b/.sanity-ansible-ignore-2.9.txt index d59138d7..bc53b484 100644 --- a/.sanity-ansible-ignore-2.9.txt +++ b/.sanity-ansible-ignore-2.9.txt @@ -18,4 +18,3 @@ tests/storage/scripts/generate_tests.py future-import-boilerplate!skip tests/storage/scripts/generate_tests.py shebang!skip tests/storage/scripts/post-commit shebang!skip tests/storage/scripts/pre-commit shebang!skip -roles/storage/.ostree/get_ostree_data.sh shebang!skip