Skip to content

Commit

Permalink
debug ansible-lint action
Browse files Browse the repository at this point in the history
  • Loading branch information
richm committed Dec 15, 2023
1 parent 5beb4b6 commit 98d6cd5
Showing 1 changed file with 8 additions and 26 deletions.
34 changes: 8 additions & 26 deletions .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,36 +37,18 @@ jobs:
- name: Convert role to collection format
run: |
set -euxo pipefail
LSR_ROLE2COLL_DEBUG=true TOXENV=collection lsr_ci_runtox
# copy the ignore files
TOXENV=collection lsr_ci_runtox
coll_dir=".tox/ansible_collections/$LSR_ROLE2COLL_NAMESPACE/$LSR_ROLE2COLL_NAME"
# wokeignore:rule=sanity
ignore_dir="$coll_dir/tests/sanity"
if [ ! -d "$ignore_dir" ]; then
mkdir -p "$ignore_dir"
fi
# wokeignore:rule=sanity
for file in .sanity-ansible-ignore-*.txt; do
if [ -f "$file" ]; then
# wokeignore:rule=sanity
cp "$file" "$ignore_dir/${file//*.sanity-ansible-}"
fi
done
# ansible-lint action requires a .git directory???
# https://github.com/ansible/ansible-lint/blob/main/action.yml#L45
mkdir -p "$coll_dir/.git"
# need .ansible-lint at the collection root directory
for file in "$coll_dir"/roles/*/.ansible-lint; do
if [ -f "$file" ]; then
cp "$file" "$coll_dir"
break
fi
done
# doesn't like mock_roles
sed -e '/^mock_roles:/d' -e '/- linux-system-roles[.]/d' \
-i "$coll_dir/.ansible-lint"
echo DEBUG
cat "$coll_dir/tests/kernel_settings/tests_default.yml"
# # need .ansible-lint at the collection root directory
# for file in "$coll_dir"/roles/*/.ansible-lint; do
# if [ -f "$file" ] && [ ! -f "$coll_dir/.ansible-lint" ]; then
# cp "$file" "$coll_dir"
# break
# fi
# done
- name: Run ansible-lint
uses: ansible/ansible-lint@v6
Expand Down

0 comments on commit 98d6cd5

Please sign in to comment.