From c97c2b9aae502c292e4cad93378e895a1f74f3f6 Mon Sep 17 00:00:00 2001 From: Dawa Ometto Date: Tue, 21 May 2024 16:26:22 +0200 Subject: [PATCH] Fix ansible-test linting --- .github/workflows/ansible-test.yml | 7 ++++--- plugins/modules/ibridges_sync.py | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index 973ee2a..8292614 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -7,8 +7,8 @@ on: - main jobs: - molecule: - name: molecule + ansible_test: + name: ansible-test runs-on: ubuntu-latest strategy: fail-fast: false @@ -29,7 +29,8 @@ jobs: - python: 3.12 - ansible: stable-2.9 steps: - + - uses: actions/checkout@v4 + - run: rm -rf docker # prevent dockerfiles from being linted - name: Perform sanity testing with ansible-test uses: ansible-community/ansible-test-gh-action@release/v1 with: diff --git a/plugins/modules/ibridges_sync.py b/plugins/modules/ibridges_sync.py index d5db964..5e2ee02 100644 --- a/plugins/modules/ibridges_sync.py +++ b/plugins/modules/ibridges_sync.py @@ -33,7 +33,7 @@ env: description: A dictionary containing all the information about your iRODS environment. required: false - type: str + type: dict password: description: The password to use to connect to iRODS. required: true @@ -121,7 +121,7 @@ def run_module(): ) try: from ibridges import Session, sync_data, IrodsPath - except: + except ImportError: module.fail_json(msg="Please install the 'ibridges' python package.", changed=False) from pathlib import Path