From b62496219cc6dc42b689eff6300c08d5feaad536 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Fri, 8 Apr 2022 09:27:15 +0100 Subject: [PATCH] More fixes (#115) --- .../{{cookiecutter.scenario_name}}/converge.yml | 5 +---- src/molecule_podman/playbooks/validate-dockerfile.yml | 2 +- tox.ini | 9 +++++++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/molecule_podman/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/converge.yml b/src/molecule_podman/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/converge.yml index 6633181..9db696d 100644 --- a/src/molecule_podman/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/converge.yml +++ b/src/molecule_podman/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/converge.yml @@ -4,12 +4,9 @@ tasks: # replace these tasks with whatever you find suitable to test - name: Copy something to test use of synchronize module - ansible.posix.synchronize: + ansible.builtin.copy: src: /etc/hosts dest: /tmp/hosts-from-controller - # synchronize module works with podman connections only with 2.11+ so - # we skip running it on unsupported platforms. - when: "ansible_version.full is version_compare('2.11', '>=')" - name: "Include {{ cookiecutter.role_name }}" ansible.builtin.include_role: name: "{{ cookiecutter.role_name }}" diff --git a/src/molecule_podman/playbooks/validate-dockerfile.yml b/src/molecule_podman/playbooks/validate-dockerfile.yml index 96028ee..e1d6c27 100644 --- a/src/molecule_podman/playbooks/validate-dockerfile.yml +++ b/src/molecule_podman/playbooks/validate-dockerfile.yml @@ -11,7 +11,7 @@ # not mean molecule itself can run on them. - image: alpine:edge - image: centos:7 - - image: centos:8 + # - image: centos:8 - image: ubuntu:latest - image: debian:latest tasks: diff --git a/tox.ini b/tox.ini index 12a1346..ad5e79f 100644 --- a/tox.ini +++ b/tox.ini @@ -43,6 +43,10 @@ deps = ansible212: ansible-core>=2.12.4,<2.13.0 dockerfile: ansible-core>=2.12.4 selinux +commands_pre = + # No need to bother starting tests if these are now working + - podman system connection list + - podman info commands = # this should mention oldest version we find acceptable for runtime ansible-galaxy collection install -r requirements.yml @@ -57,11 +61,13 @@ commands = whitelist_externals = ansible-galaxy find + podman rm sh [testenv:lint] description = Runs all linting tasks +commands_pre = commands = # to run a single linter you can do "pre-commit run flake8" python -m pre_commit run {posargs:--all} @@ -76,6 +82,7 @@ description = Invoke sphinx-build to build the HTML docs basepython = python3 passenv = * usedevelop = False +commands_pre = commands = python -m sphinx \ -a -n -W \ @@ -95,6 +102,7 @@ description = Invoke sphinx-autobuild to build and reload the HTML docs basepython = {[testenv:docs]basepython} passenv = {[testenv:docs]passenv} usedevelop = {[testenv:docs]usedevelop} +commands_pre = commands = python -m sphinx_autobuild docs/ "{toxworkdir}/docs/html" deps = @@ -117,6 +125,7 @@ deps = toml >= 0.10.1 twine >= 3.2.0 # pyup: ignore setenv = +commands_pre = commands = rm -rfv {toxinidir}/dist/ python -m pep517.build \