RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1843832 - [ansible-freeipa] Required correct error message for adding the invalid IP address in DNS config module
Summary: [ansible-freeipa] Required correct error message for adding the invalid IP ad...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ansible-freeipa
Version: 8.3
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Rafael Jeffman
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-04 09:16 UTC by Varun Mylaraiah
Modified: 2020-11-04 02:47 UTC (History)
3 users (show)

Fixed In Version: ansible-freeipa-0.1.11-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 02:46:57 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2020:4663 0 None None None 2020-11-04 02:47:07 UTC

Description Varun Mylaraiah 2020-06-04 09:16:46 UTC
Description of problem:
Required correct error message for adding the invalid IP address in the ansible-freeipa DNS config module


Version-Release number of selected component (if applicable):
ansible-freeipa-0.1.10-1.el8.noarch

Steps to Reproduce:

[root@ansible ~]# cat dnsconf01.yaml
---
- name: Test dnsconfig
  hosts: ipaserver
  become: true

  tasks:
  # Setup.
  - name: Ensure dns config
    ipadnsconfig:
      Ipaadmin_password: <xxxxxxxxxx>
      forwarders:
        - ip_address: 1.in.va.lid

[root@ansible ~]# ansible-playbook -vv -i inventory/server.hosts dnsconf01.yaml
ansible-playbook 2.9.9
  config file = /root/ansible.cfg
  configured module search path = ['/root/ansible-freeipa/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.6/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 3.6.8 (default, Apr  3 2020, 16:09:51) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
Using /root/ansible.cfg as config file

PLAYBOOK: dnsconf01.yaml **************************************************************************************************************
1 plays in dnsconf01.yaml

PLAY [Test dnsconfig] *****************************************************************************************************************

TASK [Gathering Facts] ****************************************************************************************************************
task path: /root/dnsconf01.yaml:2
ok: [master.ipadomain.test]
META: ran handlers

TASK [Ensure dns config] **************************************************************************************************************
task path: /root/dnsconf01.yaml:8
fatal: [master.ipadomain.test]: FAILED! => {"changed": false, "msg": "'AnsibleModule' object has no attribute 'fail'"}

PLAY RECAP ****************************************************************************************************************************
master.ipadomain.test      : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0 

Actual results:
FAILED! => {"changed": false, "msg": "'AnsibleModule' object has no attribute 'fail'"}

Expected results:
[root@master ~]# ipa dnsconfig-mod --forwarder=1.in.val.id
Server will check DNS forwarder(s).
This may take some time, please wait ...
ipa: ERROR: invalid 'forwarder': invalid IP address format

Comment 1 Rafael Jeffman 2020-06-08 15:08:48 UTC
There is an upstream PR for this issue: https://github.com/freeipa/ansible-freeipa/pull/296

Comment 2 Thomas Woerner 2020-06-11 15:05:56 UTC
The upstream PR has been merged.

Comment 7 anuja 2020-07-27 12:11:09 UTC
Verified using:ansible_freeipa_tests/dns_module.py Test: test_dnsconfig_add_invalid_ip
Using version: 
ansible-freeipa-0.1.12-5.el8.noarch
ipa-server-common-4.8.7-7.module+el8.3.0+7376+c83e4fcd.noarch

2020-07-27T10:58:02+0000 ansible_freeipa_tests/dns_module.py::TestDNSConfig::test_dnsconfig_add_invalid_ip 
2020-07-27T10:58:02+0000 -------------------------------- live log call ---------------------------------
2020-07-27T10:58:02+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO WRITE inventory/dns.hosts
2020-07-27T10:58:02+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO PUT dns_module.yml
2020-07-27T10:58:02+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/dns.hosts', 'dns_module.yml']
2020-07-27T10:58:07+0000 PASSED                                                                   [ 15%]

Marking bz as verified using existing automated test.

Comment 11 errata-xmlrpc 2020-11-04 02:46:57 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 (ansible-freeipa 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/RHEA-2020:4663


Note You need to log in before you can comment on or make changes to this bug.