Skip to content
This repository has been archived by the owner on Jan 8, 2023. It is now read-only.

Commit

Permalink
Ensure testing of synchronize module
Browse files Browse the repository at this point in the history
Related: #45
  • Loading branch information
ssbarnea committed Aug 20, 2021
1 parent 8b9cd81 commit f26fa3b
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
exclude_paths:
- src/molecule_podman/cookiecutter/{{cookiecutter.molecule_directory}}
17 changes: 5 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ exclude: |
)
repos:
- repo: https://github.com/PyCQA/isort
rev: 5.8.0
rev: 5.9.3
hooks:
- id: isort
- repo: https://github.com/python/black.git
rev: 21.6b0
rev: 21.7b0
hooks:
- id: black
language_version: python3
Expand All @@ -34,15 +34,8 @@ repos:
- flake8-black>=0.1.1
- flake8-docstrings>=1.5.0
language_version: python3
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.26.1
hooks:
- id: yamllint
files: \.(yaml|yml)$
types: [file, yaml]
entry: yamllint --strict
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.902
rev: v0.910
hooks:
- id: mypy
# empty args needed in order to match mypy cli behavior
Expand All @@ -53,13 +46,13 @@ repos:
- molecule
- packaging
- repo: https://github.com/pre-commit/mirrors-pylint
rev: v3.0.0a3
rev: v3.0.0a4
hooks:
- id: pylint
additional_dependencies:
- ansible-core>=2.11.1
- molecule
- repo: https://github.com/ansible/ansible-lint.git
rev: v5.1.0a0
rev: v5.1.2
hooks:
- id: ansible-lint
8 changes: 8 additions & 0 deletions requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
collections:
- name: ansible.posix
version: 1.3.0
# This version is the first one that enables use of synchronize
# module with with podman.
# https://galaxy.ansible.com/ansible/posix
- name: containers.podman
version: 1.6.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{# note: Used during molecule-podman own testing to ensure syncronize module
can be used with podman as this is an important feature. Users can remove
the prepare.yml file if they do not need it but we should keep in inside the
template.
#}---
- name: Prepare
hosts: all
tasks:
- name: Copy something to test using synchronize module
ansible.posix.synchronize:
src: LICENSE
dest: .
1 change: 1 addition & 0 deletions src/molecule_podman/playbooks/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@
label: "{{ item.name }}"
async: 7200
poll: 0
changed_when: true

- name: Wait for instance(s) creation to complete
async_status:
Expand Down
1 change: 1 addition & 0 deletions src/molecule_podman/playbooks/destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
with_items: "{{ molecule_yml.platforms }}"
async: 7200
poll: 0
changed_when: true

- name: Wait for instance(s) deletion to complete
async_status:
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ deps =
commands =
ansibledevel: ansible-galaxy collection install git+https://github.com/containers/ansible-podman-collections
# this should mention oldest version we find acceptable for runtime
ansible-galaxy collection install 'containers.podman:==1.6.2'
ansible-galaxy collection install -r {toxinidir}/requirements.yml
# failsafe as pip may install incompatible dependencies
pip check
# failsafe for preventing changes that may break pytest collection
Expand Down

0 comments on commit f26fa3b

Please sign in to comment.