[Satellite6] Ansible runs are failing if ran over interface with primary and secondary IP

Solution Verified - Updated -

Issue

Ansible runs are failing if iterface with multiple IP adresses is selected for remote execution.

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 52:54:00:fe:ea:44 brd ff:ff:ff:ff:ff:ff
    inet 192.168.140.227/24 brd 192.168.140.255 scope global noprefixroute dynamic eth0
       valid_lft 43186sec preferred_lft 43186sec
    inet 192.168.140.27/24 brd 192.168.140.255 scope global secondary noprefixroute eth0:1
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fefe:ea44/64 scope link 
       valid_lft forever preferred_lft forever
#subscription-manager facts | grep net.interface | grep ipv4_address 
net.interface.eth0.ipv4_address: 192.168.140.27
net.interface.eth0.ipv4_address_list: 192.168.140.227, 192.168.140.27

In this case correct primary IP is 192.168.140.227

Environment

Satellite 6
rhel7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content