Move ansible hosts file as a constant

Moving ansible hosts filename as a constant to avoid
hardcoded value.

Change-Id: I014392650849a7c18c7da85a211a8830c2b66c4f
This commit is contained in:
Mathieu Bultel 2020-02-24 09:46:03 +01:00 committed by mathieu bultel
parent cdc32888a4
commit 2cb16d3e2d
2 changed files with 2 additions and 1 deletions

View File

@ -30,6 +30,7 @@ UNDERCLOUD_CONF_PATH = os.path.join(UNDERCLOUD_OUTPUT_DIR, "undercloud.conf")
OVERCLOUD_NETWORKS_FILE = "network_data.yaml"
STANDALONE_NETWORKS_FILE = "/dev/null"
UNDERCLOUD_NETWORKS_FILE = "network_data_undercloud.yaml"
ANSIBLE_HOSTS_FILENAME = "hosts.yaml"
# The name of the file which holds the plan environment contents
PLAN_ENVIRONMENT = 'plan-environment.yaml'

View File

@ -320,7 +320,7 @@ def run_ansible_playbook(playbook, inventory, workdir, playbook_dir=None,
return ansible_runner.utils.dump_artifact(
inventory,
ansible_artifact_path,
'hosts'
constants.ANSIBLE_HOSTS_FILENAME
)
if not playbook_dir: