1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-02-04 07:11:49 +00:00

Fix modules for newest pylint in ansible-test (#286)

This commit is contained in:
Sergey 2021-08-15 19:40:07 +03:00 committed by GitHub
parent e9ace7b4bf
commit 1f28b52242
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 4 deletions

11
contrib/ansible-lint.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/bash
mkdir -p /tmp/ansible-lint-installs
mkdir -p /tmp/ansible-lint-collection
rm -rf /tmp/ansible-lint-collection/*
ansible-galaxy collection build --output-path /tmp/ansible-lint-collection --force
pushd /tmp/ansible-lint-collection/
ansible-galaxy collection install -vvv --force $(ls /tmp/ansible-lint-collection/) -p /tmp/ansible-lint-installs
pushd /tmp/ansible-lint-installs/ansible_collections/containers/podman
ansible-test sanity --docker --color --truncate 0 --no-redact --no-pip-check --python 3.9 -v plugins/ tests/
popd
popd

View file

@ -312,8 +312,8 @@ class PodmanPodDiff:
after = self.params['infra_image']
before = before.replace(":latest", "")
after = after.replace(":latest", "")
before = before.split("/")[-1]
after = after.split("/")[-1]
before = before.split("/")[-1] # pylint: disable=W,C,R
after = after.split("/")[-1] # pylint: disable=W,C,R
return self._diff_update_and_compare('infra_image', before, after)
# TODO(sshnaidm): https://github.com/containers/podman/pull/6956

View file

@ -53,8 +53,8 @@ from ..module_utils.podman.podman_container_lib import set_container_opts # noq
def combine(results):
changed = any([i.get('changed', False) for i in results])
failed = any([i.get('failed', False) for i in results])
changed = any(i.get('changed', False) for i in results)
failed = any(i.get('failed', False) for i in results)
actions = []
podman_actions = []
containers = []