diff --git a/.ansible-lint b/.ansible-lint index 0c3a55d0e4..cb84f97357 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1,9 +1,20 @@ +--- skip_list: - - metadata + - fqcn + - yaml[truthy] + - key-order[task] + - run-once[task] + - var-naming[no-role-prefix] warn_list: - - risky-file-permissions - risky-shell-pipe - - unnamed-task - no-handler - - var-naming + +extra_vars: + nova_hosts: nova_all + nova_serial: 100% + neutron_hosts: neutron_all + neutron_serial: 100% + cinder_hosts: cinder_all + cinder_serial: 100% + service_group: haproxy_all diff --git a/scripts/bootstrap-ansible.sh b/scripts/bootstrap-ansible.sh index ef11ed0664..e84d8c2179 100755 --- a/scripts/bootstrap-ansible.sh +++ b/scripts/bootstrap-ansible.sh @@ -22,7 +22,7 @@ set -e -u -x export HTTP_PROXY=${HTTP_PROXY:-""} export HTTPS_PROXY=${HTTPS_PROXY:-""} # The Ansible version used for testing -export ANSIBLE_PACKAGE=${ANSIBLE_PACKAGE:-"ansible-core==2.13.8"} +export ANSIBLE_PACKAGE=${ANSIBLE_PACKAGE:-"ansible-core==2.15.3"} export ANSIBLE_ROLE_FILE=${ANSIBLE_ROLE_FILE:-"ansible-role-requirements.yml"} export ANSIBLE_COLLECTION_FILE=${ANSIBLE_COLLECTION_FILE:-"ansible-collection-requirements.yml"} export USER_ROLE_FILE=${USER_ROLE_FILE:-"user-role-requirements.yml"} diff --git a/scripts/gate-check-commit.sh b/scripts/gate-check-commit.sh index a50edd801d..68696f591a 100755 --- a/scripts/gate-check-commit.sh +++ b/scripts/gate-check-commit.sh @@ -137,9 +137,6 @@ elif [[ "${ACTION}" == "linters" ]]; then # defining working directories VENV_BIN_DIR=$(dirname ${PIP_COMMAND}) - # Due to ansible-lint bug, it can't run from venv without sourcing it - # https://github.com/ansible-community/ansible-lint/issues/1507 - source ${VENV_BIN_DIR}/activate source /usr/local/bin/openstack-ansible.rc # Check if we have test playbook and running checks if [[ -f "/etc/ansible/roles/${SCENARIO}/examples/playbook.yml" ]]; then @@ -170,7 +167,6 @@ elif [[ "${ACTION}" == "linters" ]]; then --exclude-dir doc \ "${ROLE_DIR}" | xargs -r ${VENV_BIN_DIR}/flake8 --verbose - deactivate popd else pushd "${OSA_CLONE_DIR}/playbooks" diff --git a/test-requirements.txt b/test-requirements.txt index d6e73cb9ea..88615ad250 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -11,6 +11,6 @@ virtualenv>=14.0.6 # MIT # once we stop doing linters check for the integrated repo with # openstack-ansible-tests/test-ansible-lint.sh flake8==3.8.3 # MIT -ansible-lint==5.3.2 # MIT +ansible-lint==6.19.0 # MIT netaddr>=0.7.18 # BSD Jinja2>=2.10 # BSD