Fix to get HOME environment in dhcp-provisioning validation

The validation of dhcp-provisioning fails because it doesn't see
the correct path of undercloud.conf. The playbook has "become: true",
so the ansible_env.HOME is the home directory of root.

lookup(env, HOME) can get the home directory for the user.

Change-Id: I7c7de26f09f36d88b777be76027ad4ac66deda6b
(cherry picked from commit 8e4958cd75)
This commit is contained in:
Masayoshi Mizuma 2022-06-20 18:16:18 +09:00 committed by David Peacock
parent fe5b61e81c
commit b90ee9e79c
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@
- name: Gather undercloud.conf values
validations_read_ini:
path: "{{ ansible_env.HOME }}/undercloud.conf"
path: "{{ lookup('env', 'HOME') }}/undercloud.conf"
section: DEFAULT
key: local_interface
ignore_missing_file: true