Open StevenBarre opened 11 months ago
Not sure how we'll be able to detect duplicates with IPs not listed in the INV files?
In the inventory files, the ip addresses are in the line containing 'ip:' so we can extract that data and feed it to awk something like this:
grep -R "ip:" inventory/host_vars/* | awk -F ':' '{if($3 in x){if(x[$3]) print x[$3]; print;x[$3]=""} else x[$3]=$0}'
The one issue here is that klab2 and emerald share a bootstrap ip address - could be filtered out with an inverse grep if desired.
Had to try another approach to this as the last effort didn't yield a working result on the first test. Added a new workflow to test and am attempting to determine why the second task isn't running the way I think it should.
Created a new repo for testing https://github.com/tbaker1313/test-actions
Describe the issue When adding new nodes with dhcp stuff, we need to double check that we aren't adding duplicate IPs. https://github.com/bcgov-c/rhcos-ignition-builder/pull/120
What is the Value/Impact? Prevent duplicate IPs in DHCP config
What is the plan? How will this get completed? Can we create a github action to lint PRs and alert if there are duplicate IPs in the inventory files
Identify any dependencies None
Definition of done