From 865e85a277dd97731da2dd7cd65efd0d4c6edc0b Mon Sep 17 00:00:00 2001 From: Sanjay Chari Date: Thu, 22 Jun 2023 11:05:26 +0530 Subject: [PATCH] Fix ansible-lint issue There are failures with ansible-lint. https://zuul.opendev.org/t/openstack/build/b89f36f3bd534733b2337a661bc090e5 This patch fixes the issue Change-Id: I1249aa48837df422379e3b3daa17d3a67f1ef336 --- .ansible-lint | 10 ++++++++++ .pre-commit-config.yaml | 9 +++++---- requirements.yml | 4 ++++ 3 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 requirements.yml diff --git a/.ansible-lint b/.ansible-lint index 69d79af21..eb34e39df 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1,5 +1,6 @@ --- parseable: true +profile: min skip_list: - '102' - '106' @@ -18,4 +19,13 @@ skip_list: - ANSIBLE0012 exclude_paths: - .zuul.yaml + - rally + # Temporarily disable linting on these existing playbooks as syntax errors are reported + # in them with ansible-lint rev 6.17.2. + - ansible/oooq + - ansible/gather/stockpile.yml + - ansible/logs/get-overcloud-logs.yml + - ansible/browbeat/install-at.yml + - ansible/common_logging/install_logging.yml + - ocp_on_osp/ocp_cleanup.yml use_default_rules: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f0304bedc..65f1e9fd5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,11 +9,12 @@ repos: - id: check-merge-conflict - id: debug-statements - repo: https://github.com/ansible/ansible-lint - rev: v4.3.5 + rev: v6.17.2 hooks: - id: ansible-lint - files: 'ansible/.(yaml|yml)$' - exclude: ^(rally/|\.zuul\.yml) + always_run: true + pass_filenames: false entry: ansible-lint --force-color -v additional_dependencies: - - rich<11.0.0 + - ansible-core + - yamllint diff --git a/requirements.yml b/requirements.yml new file mode 100644 index 000000000..9dbb90c04 --- /dev/null +++ b/requirements.yml @@ -0,0 +1,4 @@ +--- +collections: + - name: community.general + - name: ansible.posix