theforeman / foreman-ansible-modules

Ansible modules for interacting with the Foreman API and various plugin APIs such as Katello
GNU General Public License v3.0
147 stars 163 forks source link

foreman_domain module does not update dns capsule (dns_proxy) #808

Closed rht-jbittner closed 4 years ago

rht-jbittner commented 4 years ago
SUMMARY

Ansible role foreman_domain is not capable to change/update dns_proxy settings. (In Satellite terminology DNS Capsule) for managed domain.

ISSUE TYPE
ANSIBLE VERSION
ansible 2.9.7
  config file = /home/at-home/projekty/ansible/ansible.cfg
  configured module search path = ['/usr/share/ansible', '/home/at-home/projekty/ansible/external_modules/foreman-ansible-modules/plugins/modules', '/home/at-home/projekty/ansible/library']
  ansible at-home module location = /usr/lib/python3.6/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.6.8 (default, Dec  5 2019, 15:45:45) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
KATELLO/FOREMAN VERSION
tfm-rubygem-katello-3.12.0.30-1.el7sat.noarch
foreman-1.22.0.33-1.el7sat.noarch
APYPIE VERSION
Metadata-Version: 1.1
Version: 0.2.0
STEPS TO REPRODUCE
  1. Create domain with Ansible foreman_domain module. Leave DNS Capsule empty (dns_proxy: )
  2. Use foreman_domain module to update domain with DNS Capsule (dns_proxy: )
  3. Nothing happens
EXPECTED RESULTS

DNS Capsule updated.

ACTUAL RESULTS

DNS Capsule is still empty (the same).

I think that reason behind this is that foreman_domain checks location, organization, etc. config, but not DNS Capsule (no API query logged).

evgeni commented 4 years ago

Hey, could you please provide a playbook that triggers this? Because I could not reproduce it (on a newer Foreman version, but that shouldn't matter). I can create a domain without a proxy, and then in a second call assign the proxy just fine.

rht-jbittner commented 4 years ago

I am sorry @evgeni , I had typo in my Ansible code.

Sorry for that.

evgeni commented 4 years ago

No worries! That happens!

Out of curiosity, what was the typo? Could the module in any way have caught that?