From 577f6bad21b3622892965f63d289b932b29def45 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Sun, 5 Sep 2021 15:35:45 +0100 Subject: [PATCH] Ensure testing of synchronize module (#58) Related: #45 --- .../{{cookiecutter.scenario_name}}/converge.yml | 8 ++++++++ 1 file changed, 8 insertions(+) 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 fecf1c8..2b611fd 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 @@ -2,6 +2,14 @@ - name: Converge hosts: all tasks: + # replace these tasks with whatever you find suitable to test + - name: Copy something to test use of synchronize module + ansible.posix.synchronize: + 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 }}" include_role: name: "{{ cookiecutter.role_name }}"