Bug 1843828

Summary: [ansible-freeipa] Required correct error message for adding DNS forwardzone without forwarders.
Product: Red Hat Enterprise Linux 8 Reporter: Varun Mylaraiah <mvarun>
Component: ansible-freeipaAssignee: Rafael Jeffman <rjeffman>
Status: CLOSED ERRATA QA Contact: ipa-qe <ipa-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.3CC: amore, rjeffman, twoerner
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ansible-freeipa-0.1.12-2.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 02:46:35 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:

Description Varun Mylaraiah 2020-06-04 09:12:26 UTC
Description of problem:
Required correct error message for adding DNS forwardzone without forwarders in the ansible-freeipa Dnsforwardzone module.

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

Steps to Reproduce:

[root@ansible ~]# cat dnsfrwzone01.test
---
- name: Test dnsforwardzone
  hosts: ipaserver
  become: true
  gather_facts: false

  tasks:
  - name: ensure forwardzone test
    ipadnsforwardzone:
      ipaadmin_password: <xxxxxxxx>
      name: newfzone.com

[root@ansible ~]# ansible-playbook -vv -i inventory/server.hosts dnsfrwzone01.test
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: dnsfrwzone01.test ***********************************************************************************************************
1 plays in dnsfrwzone01.test

PLAY [Test dnsforwardzone] ************************************************************************************************************
META: ran handlers

TASK [ensure forwardzone test] ********************************************************************************************************
task path: /root/dnsfrwzone01.test:8
ok: [master.ipadomain.test] => {"ansible_facts": {"discovered_interpreter_python": "/usr/libexec/platform-python"}, "changed": false, "dnsforwardzone": {}}
META: ran handlers
META: ran handlers

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


Expected results:
[root@master ~]# ipa dnsforwardzone-add testzone.com
DNS forwarder: 
ipa: ERROR: invalid 'idnsforwarders': Please specify forwarders.

Comment 1 Rafael Jeffman 2020-06-16 02:52:19 UTC
There is an upstream PR available https://github.com/freeipa/ansible-freeipa/pull/304

Comment 3 Thomas Woerner 2020-06-29 10:28:10 UTC
The PR has been merged upstream.

Comment 9 anuja 2020-07-28 10:10:03 UTC
Verified using: ansible_freeipa_tests/dns_module.py::TestDNSForwardZone::test_no_dnsforwardzone
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-28T07:44:30+0000 ansible_freeipa_tests/dns_module.py::TestDNSForwardZone::test_no_dnsforwardzone 
2020-07-28T07:44:30+0000 -------------------------------- live log call ---------------------------------
2020-07-28T07:44:30+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-07-28T07:44:30+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'dnsforwardzone-find']
2020-07-28T07:44:31+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kdestroy', '-A']
2020-07-28T07:44:31+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO WRITE inventory/dns.hosts
2020-07-28T07:44:31+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO PUT dns_module.yml
2020-07-28T07:44:31+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-28T07:44:36+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-07-28T07:44:36+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'dnsforwardzone-find']
2020-07-28T07:44:37+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kdestroy', '-A']
2020-07-28T07:44:37+0000 PASSED                                                                   [ 44%]

Comment 14 errata-xmlrpc 2020-11-04 02:46:35 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