Skip to content

Commit

Permalink
Ignore errors from gathering list of ifcfg files
Browse files Browse the repository at this point in the history
Fedora 36 removes the NetworkManager legacy configuration file support
(ifcfg files). As the ifcfg files are not present for Fedora 36, the
automation to create new vagrant template boxes is broken.

With this commit, errors from clean_mac_addresses.yml when trying to
fetch ifcfg files are simply ignored.

Signed-off-by: Francisco Trivino <ftrivino@redhat.com>
  • Loading branch information
f-trivino authored and netoarmando committed May 17, 2022
1 parent 2f0f549 commit 19f9cef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ansible/roles/machine/cleanup/tasks/clean_mac_addresses.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
- name: gather list of ifcfg files
raw: find /etc/sysconfig/network-scripts/ -type f -name "ifcfg-*"
raw: find /etc/sysconfig/network-scripts/ -type f -name "ifcfg-*" 2>/dev/null
register: ifcfg_files
ignore_errors: yes

- name: remove HWADDR line from ifcfg files
lineinfile:
Expand Down

0 comments on commit 19f9cef

Please sign in to comment.