Bug 2048057

Summary: incorrectly missing netaddr on a controller
Product: Red Hat Enterprise Linux 8 Reporter: Ondrej Moriš <omoris>
Component: rhel-system-rolesAssignee: Rich Megginson <rmeggins>
Status: CLOSED ERRATA QA Contact: David Jež <djez>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.6CC: djez, nhosoi, pkettman, spetrosi
Target Milestone: rc   
Target Release: 8.6   
Hardware: All   
OS: Linux   
Whiteboard: role:vpn
Fixed In Version: rhel-system-roles-1.12.0-1.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-10 14:12:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Deadline: 2022-02-14   

Description Ondrej Moriš 2022-01-29 09:04:28 UTC
Description of problem:

Package python3-netaddr is a dependency of ansible-core. Nevertheless ansible does not see that package:

# rpm -q python3-netaddr
python3-netaddr-0.7.19-8.el8.noarch

# ansible-playbook -i ansible-inventory.yml test-east-west.yml
PLAY [Ensure that the role runs with default parameters] ***********************

TASK [Gathering Facts] *********************************************************
ok: [west]
ok: [east]

TASK [linux-system-roles.vpn : set platform/version specific variables] ********
included: /usr/share/ansible/roles/rhel-system-roles.vpn/tasks/set_vars.yml for west, east

TASK [linux-system-roles.vpn : Set platform/version specific variables] ********
skipping: [west] => (item=RedHat.yml) 
skipping: [west] => (item=RedHat.yml) 
ok: [west] => (item=RedHat_8.yml)
skipping: [west] => (item=RedHat_8.6.yml) 
skipping: [east] => (item=RedHat.yml) 
skipping: [east] => (item=RedHat.yml) 
ok: [east] => (item=RedHat_8.yml)
skipping: [east] => (item=RedHat_8.6.yml) 

TASK [linux-system-roles.vpn : Ensure required packages are installed] *********
ok: [east]
ok: [west]

TASK [linux-system-roles.vpn : Enforce default auth method as needed] **********
ok: [west -> localhost]

TASK [linux-system-roles.vpn : Make sure that the hosts list is not empty] *****
skipping: [west]

TASK [linux-system-roles.vpn : Ensure cert_names are populated when auth_method is cert] ***
skipping: [west]

TASK [linux-system-roles.vpn : generate psks] **********************************
ok: [west -> localhost]

TASK [linux-system-roles.vpn : set psks for hosts] *****************************
ok: [west]
ok: [east]

TASK [linux-system-roles.vpn : create ipsec.conf files] ************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.errors.AnsibleFilterError: The ipaddr filter requires python's netaddr be installed on the ansible controller
failed: [west] (item=east) => {"ansible_loop_var": "item", "changed": false, "item": "east", "msg": "AnsibleFilterError: The ipaddr filter requires python's netaddr be installed on the ansible controller"}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.errors.AnsibleFilterError: The ipaddr filter requires python's netaddr be installed on the ansible controller
failed: [east] (item=west) => {"ansible_loop_var": "item", "changed": false, "item": "west", "msg": "AnsibleFilterError: The ipaddr filter requires python's netaddr be installed on the ansible controller"}

PLAY RECAP *********************************************************************
east                       : ok=5    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   
west                       : ok=7    changed=0    unreachable=0    failed=1    skipped=2    rescued=0    ignored=0   

Version-Release number of selected component (if applicable):

ansible-core-2.12.1-1.el8.x86_64
python3-netaddr-0.7.19-8.el8.noarch

How reproducible:

100% 

Steps to Reproduce:

1. Use a role that uses ipaddr filter (eg. vpn role)

Actual results:

See above.

Expected results:

No issues.

Additional info:

On RHEL-8.5 the same scenario worked fine with ansible-2.9.27-1.el8.

Comment 10 errata-xmlrpc 2022-05-10 14:12:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (rhel-system-roles bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:1896