Fix incorrect variables in ansible role scripts
Both bootstap-ansible.sh and os-ansible-role-requirements.py had variables that weren't correct. This change fixes both. * bootstrap-ansible.sh now checks for ANSIBLE_ROLE_FILE rather than hardcoding lookup for `ansible-role-requirements.yml`. For reference, that file name is the default value for ANSIBLE_ROLE_FILE. * os-ansible-role-requirements.py was checking the dirname of the requirements_file argument directly, which is just a file name, not a path. The `requirements_file` variable has the full path calculated from the passed file name. Change-Id: I2f035bc230b77c9dc4363a60ebe0436970fa8a7e Closes-Bug: #1434139 Closes-Bug: #1434129
This commit is contained in:
parent
db5c987e2b
commit
7e0f00307c
@ -70,7 +70,7 @@ fi
|
||||
pip2 install "${ANSIBLE_WORKING_DIR}" || pip install "${ANSIBLE_WORKING_DIR}"
|
||||
|
||||
# Update dependent roles
|
||||
if [ -f "ansible-role-requirements.yml" ];then
|
||||
if [ -f "${ANSIBLE_ROLE_FILE}" ];then
|
||||
# Update or create the roles manifest
|
||||
if [ "${UPDATE_ANSIBLE_REQUIREMENTS}" == "yes" ];then
|
||||
./scripts/os-ansible-role-requirements.py --requirement-file ${ANSIBLE_ROLE_FILE} update
|
||||
|
@ -253,8 +253,8 @@ def requirements_file(args):
|
||||
)
|
||||
)
|
||||
|
||||
if not os.path.isdir(os.path.dirname(args['requirement_file'])):
|
||||
os.makedirs(os.path.dirname(args['requirement_file']))
|
||||
if not os.path.isdir(os.path.dirname(requirement_file)):
|
||||
os.makedirs(os.path.dirname(requirement_file))
|
||||
|
||||
return requirement_file
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user