I cam trying to restructure a molecule file to use a common playbook to reduce code duplication.
I can get it to work with a relative path but using referring to the other playbook relative to env var like ANSIBLE_ROLES_PATH
would be more intuitive.
The commented out versions below don't work but the third variant is fine.
Is there a way to do this?
more molecule.yml
// SNIP
provisioner:
name: ansible
config_options:
defaults:
callback_whitelist: "profile_tasks, timer"
env:
ANSIBLE_ROLES_PATH: ../../../../../../roles
playbooks:
# destroy: "{{ lookup('env', 'ANSIBLE_ROLES_PATH') }}/molecule/destroy.yml"
# destroy: "{{ANSIBLE_ROLES_PATH}}/molecule/destroy.yml"
destroy: "../../../../../../roles/molecule/destroy.yml"
scenario:
name: default
verifier:
name: testinfra
lint:
name: flake8