--- - name: "Run ci/playbooks/molecule-test.yml" hosts: "{{ cifmw_zuul_target_host | default('controller') }}" gather_facts: false tasks: - name: Gather required facts ansible.builtin.setup: gather_subset: - "!all" - "!min" - "user_dir" - "env" - name: Load environment var if instructed to when: - cifmw_reproducer_molecule_env_file is defined ansible.builtin.include_vars: file: "{{ cifmw_reproducer_molecule_env_file }}" - name: Ensure group_vars dir exists ansible.builtin.file: path: "{{ roles_dir }}/../../group_vars" state: directory - name: Print related variables ansible.builtin.debug: msg: | mol_config_dir: {{ mol_config_dir }} roles_dir: {{ roles_dir }} - name: Run molecule environment: ANSIBLE_LOG_PATH: "{{ ansible_user_dir }}/zuul-output/logs/ansible-execution.log" ANSIBLE_CALLBACKS_ENABLED: "ansible.posix.profile_tasks,yaml" MOLECULE_REPORT: "/tmp/report.html" LC_ALL: en_US.utf8 LANG: en_US.utf8 PATH: >- {{ ( [ ansible_user_dir, 'test-python', 'bin' ] | ansible.builtin.path_join ) + ":" + ( ansible_env.PATH | default('') | trim(":") ) }} ansible.builtin.shell: chdir: "{{ roles_dir }}" cmd: >- set -o pipefail; molecule {% if mol_config_dir is defined and mol_config_dir %} -c {{ mol_config_dir }} {% endif %} test --all | tee {{ ansible_user_dir }}/ci-framework-data/logs/molecule-execution.log