Merge "Use template for NetworkConfig script"

This commit is contained in:
Zuul 2019-07-15 19:03:38 +00:00 committed by Gerrit Code Review
commit cf21af0b95

View File

@ -567,9 +567,13 @@ outputs:
- name: Check NetworkConfig script existence
local_action:
module: stat
path: {{ '"{{' }} tripleo_role_name ~ '/' ~ inventory_hostname ~ '/NetworkConfig' {{ '}}"' }}
path: {{ '"{{' }} lookup('first_found', NetworkConfig_paths, errros='ignore') {{ '}}"' }}
become: no
register: NetworkConfig_stat
vars:
NetworkConfig_paths:
- {{ '"{{' }} tripleo_role_name ~ '/' ~ inventory_hostname ~ '/NetworkConfig' {{ '}}"' }}
- {{ '"{{' }} tripleo_role_name ~ '/NetworkConfig' {{ '}}"' }}
- name: NetworkConfig
block:
@ -581,10 +585,10 @@ outputs:
selevel: s0
recurse: true
- name: Copy NetworkConfig script
copy:
- name: Render NetworkConfig script
template:
dest: /var/lib/tripleo-config/scripts/run_os_net_config.sh
src: {{ '"{{' }} tripleo_role_name ~ '/' ~ inventory_hostname ~ '/NetworkConfig' {{ '}}"' }}
src: {{ '"{{' }} NetworkConfig_stat.stat.path {{ '}}"' }}
mode: 0755
- name: Run NetworkConfig script