Build Windows Templates in RHV

This commit is contained in:
2021-05-03 13:47:44 -04:00
parent 595021d449
commit 28c9375b0d
290 changed files with 10931 additions and 159 deletions

View File

@@ -0,0 +1,24 @@
# SPDX-License-Identifier: BSD-3-Clause
---
- set_fact: lsr_net_profile_exists=false
- name: stat profile file
stat:
get_attributes: false
get_checksum: false
get_mime: false
path: /etc/sysconfig/network-scripts/ifcfg-{{ profile }}
register: profile_stat
- set_fact: lsr_net_profile_exists=true
when: profile_stat.stat.exists
# When certain profile is marked as absent but still up, the `nmcli connection`
# still show it with FILENAME starting with /run. Only consider profile exists
# when its FILENAME is in /etc folder
- shell: nmcli -f NAME,FILENAME connection show |grep {{ profile }} | grep /etc
register: nm_profile_exists
ignore_errors: yes
- set_fact: lsr_net_profile_exists=true
when: nm_profile_exists.rc == 0