diff --git a/playbooks/molecule/post-run.yaml b/playbooks/molecule/post-run.yaml index 6f53fac..614614f 100644 --- a/playbooks/molecule/post-run.yaml +++ b/playbooks/molecule/post-run.yaml @@ -2,4 +2,6 @@ - hosts: ubuntu-focal tasks: - name: molecule destroy - shell: "{{ molecule_executable }} destroy" \ No newline at end of file + shell: "{{ molecule_executable }} destroy" + args: + chdir: "{{ zuul.project.src_dir }}" diff --git a/playbooks/molecule/pre-run.yaml b/playbooks/molecule/pre-run.yaml index 22306a4..489b289 100644 --- a/playbooks/molecule/pre-run.yaml +++ b/playbooks/molecule/pre-run.yaml @@ -10,9 +10,9 @@ tasks: - name: molecule prepare shell: "{{ molecule_executable }} prepare" + args: + chdir: "{{ zuul.project.src_dir }}" -- hosts: localhost - tasks: - name: Grab the Molecule instance configuration set_fact: molecule_instance_config: "{{ lookup('file', molecule_instance_config_path) | from_yaml }}" diff --git a/playbooks/molecule/run.yaml b/playbooks/molecule/run.yaml index fbea14f..90936a9 100644 --- a/playbooks/molecule/run.yaml +++ b/playbooks/molecule/run.yaml @@ -3,7 +3,15 @@ tasks: - name: molecule converge shell: "{{ molecule_executable }} converge" + args: + chdir: "{{ zuul.project.src_dir }}" + - name: molecule idempotence shell: "{{ molecule_executable }} idempotence" + args: + chdir: "{{ zuul.project.src_dir }}" + - name: molecule verify - shell: "{{ molecule_executable }} verify" \ No newline at end of file + shell: "{{ molecule_executable }} verify" + args: + chdir: "{{ zuul.project.src_dir }}"