diff --git a/.ansible-lint b/.ansible-lint index 792ef5c..7fda421 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1,5 +1,6 @@ exclude_paths: - releasenotes/ + - roles/fetch_validations/ parseable: true quiet: false rulesdir: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8752d33..e3b4530 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,7 +36,7 @@ repos: always_run: true pass_filenames: false additional_dependencies: - - 'ansible<2.10' + - 'ansible-core<2.12' verbose: true entry: ansible-lint --force-color -p -v diff --git a/ansible-collections-requirements.yml b/ansible-collections-requirements.yml new file mode 100644 index 0000000..e4971c9 --- /dev/null +++ b/ansible-collections-requirements.yml @@ -0,0 +1,5 @@ +--- +collections: + - containers.podman + - community.general + - ansible.posix diff --git a/molecule-requirements.txt b/molecule-requirements.txt index e631256..8f0fd0c 100644 --- a/molecule-requirements.txt +++ b/molecule-requirements.txt @@ -1,5 +1,5 @@ # this is required for the molecule jobs -ansible>=2.8,!=2.8.9,!=2.9.12,<2.10.0 # GPLv3+ +ansible-core<2.12 # GPLv3+ ansi2html # LGPLv3+ jinja2>=2.8.0 # BSD-3-Clause mock # BSD diff --git a/playbooks/molecule/pre.yml b/playbooks/molecule/pre.yml index 4579086..bf9a57e 100644 --- a/playbooks/molecule/pre.yml +++ b/playbooks/molecule/pre.yml @@ -45,6 +45,9 @@ virtualenv_command: "{{ ensure_pip_virtualenv_command }}" virtualenv_site_packages: true + - name: Set up collections + command: "{{ ansible_user_dir }}/test-python/bin/ansible-galaxy install -fr {{ validations_common_project_path }}/ansible-collections-requirements.yml" + - name: Display test-python virtualenv package versions shell: |- . {{ ansible_user_dir }}/test-python/bin/activate diff --git a/test-requirements.txt b/test-requirements.txt index 486e2e3..4826c4d 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,7 +2,6 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -ansible>=2.8,!=2.8.9,!=2.9.12,<2.10.0 # GPLv3+ coverage!=4.4,>=4.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 stestr>=3.0.1 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 47ea250..5f2d076 100644 --- a/tox.ini +++ b/tox.ini @@ -33,12 +33,16 @@ setenv = HOME={envdir} DISABLE_PIP_VERSION_CHECK=1 commands = + ansible-galaxy install -fr {toxinidir}/ansible-collections-requirements.yml stestr run --slowest --color {posargs} deps = -r {toxinidir}/requirements.txt -r {toxinidir}/test-requirements.txt -r {toxinidir}/doc/requirements.txt -whitelist_externals = bash + ansible-core<2.12 # GPLv3+ +whitelist_externals = + bash + ansible-galaxy [testenv:py27] envtmpdir={envdir}/tmp @@ -55,7 +59,7 @@ deps = -c {env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/train} -r {toxinidir}/requirements.txt -r {toxinidir}/test-requirements.txt - ansible>=2 + ansible-core<2.12 whitelist_externals = bash cp @@ -86,6 +90,7 @@ deps = commands = bash -c "ANSIBLE_ROLES_PATH='{toxinidir}/validations_common/roles'" bash -c "ANSIBLE_LIBRARY='{toxinidir}/validations_common/library'" + ansible-galaxy install -fr {toxinidir}/ansible-collections-requirements.yml python -m pre_commit run ansible-lint -a [testenv:yamllint] @@ -117,6 +122,7 @@ deps = -c {env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r {toxinidir}/requirements.txt -r {toxinidir}/test-requirements.txt + ansible-core<2.12 # GPLv3+ commands = python '{toxinidir}/tools/validate-files.py' . {[testenv:ansible-lint]commands} diff --git a/validations_common/roles/xfs_check_ftype/molecule/default/prepare.yml b/validations_common/roles/xfs_check_ftype/molecule/default/prepare.yml index 822f32b..198c827 100644 --- a/validations_common/roles/xfs_check_ftype/molecule/default/prepare.yml +++ b/validations_common/roles/xfs_check_ftype/molecule/default/prepare.yml @@ -42,7 +42,7 @@ - skip_ansible_lint - name: Format the partition with XFS with ftype=1 - filesystem: + community.general.filesystem: fstype: xfs dev: "{{ losetup.stdout }}" opts: -n ftype=1 @@ -53,7 +53,7 @@ state: directory - name: Mount the XFS partition - mount: + ansible.posix.mount: path: /xfs src: "{{ losetup.stdout }}p1" fstype: xfs