diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2 index 8bfe5810ba..70a9e4e2ad 100644 --- a/common/deploy-steps.j2 +++ b/common/deploy-steps.j2 @@ -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