From 98d6cd5d931158499f4e6648a8e75308148c154d Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Fri, 15 Dec 2023 07:08:21 -0700 Subject: [PATCH] debug ansible-lint action --- .github/workflows/ansible-lint.yml | 34 +++++++----------------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index 39659f0..95976ac 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -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