Relevant if one or both IP address exist

I am creating a fixlet to change the DNS entries on all our Linux servers. I was going to simply create a bash script to leverage sed and replace IP A with new IP A and IP B with new IP B. The part I am not too certain about is the relevance. How can I have the relevance show that if IP A and/or IP B exists then this fixlet is relevant? I want to make sure I clear out both IP A and IP B old entries. Do I create two relevance entries like -
exists lines whose (it contains “IP A”) of file “/etc/sysconfig/network-scripts/ifcfg-ens160” and then exists lines whose (it contains “IP B”) of file “/etc/sysconfig/network-scripts/ifcfg-ens160” Would this still show up as relevant if IP A was changed but yet IP B still exists?

I hope that is clear. These are Red Hat 7.5 servers and I tried to change the /etc/resolv.conf file but after running systemctl restart network the DNS address default back to their original.

If there is an easier method to change DNS on RHEL 7.5 with BigFix I am all ears as I am new to BigFix and slowly learning what all it can do.

Try:

q: exists lines whose (it contains “1.1.1.1” or it contains “2.2.2.2”) of file “/etc/sysconfig/network-scripts/ifcfg-ens160”

1 Like

Q: exists lines whose (it contains “1.1.1.1" or it contains “2.2.2.2”) of file “/etc/sysconfig/network-scripts/ifcfg-ens160”
E: This expression contained a character which is not allowed.

Why do they call them “SmartQuotes”?

trying again

q: exists lines whose (it contains "1.1.1.1" or it contains "2.2.2.2") of file "/etc/sysconfig/network-scripts/ifcfg-ens160"

1 Like

Excellent! Thanks brolly33.