Use an absolute path for the role requirements file

Instead of providing the file lookup plugin with a relative path,
which it uses to search a variety of different paths, we can provide
an absolute path to the role requirements file based on the playbook
location.

Change-Id: Ie8452a1ed491acd5f846e2cd6cacba13dbd9f5b9
This commit is contained in:
Logan V 2018-07-12 10:02:37 -05:00
parent df5f9738df
commit 5d26f75a51

View File

@ -78,9 +78,8 @@
delay: "{{ git_clone_retry_delay }}"
vars:
ansible_python_interpreter: "/usr/bin/python"
required_roles: "{{ lookup('file', role_file) | from_yaml }}"
role_file: '../ansible-role-requirements.yml'
role_file: "{{ playbook_dir }}/../ansible-role-requirements.yml"
role_path_default: '/etc/ansible/roles'
git_clone_retries: 2
git_clone_retry_delay: 5