community.general
community.general copied to clipboard
ipa_dnsrecord: SRV Records are not correctly managed by Identity DNS (IPA)
NOTE: This problem has already been stated in at least 3 issues in the old repo:
https://github.com/ansible/ansible/issues/69621 https://github.com/ansible/ansible/issues/33193 https://github.com/ansible/ansible/pull/66170
There are tentative addressing this problem in the past issues but there is no idempotent solution AFAIK.
SUMMARY
The problem itself: You should be able to append values to a record or to substitute it if the record already exist. I.E. Tipically an SRV or a MX record will contain many values and those values may change during time.
ISSUE TYPE
- Bug Report
COMPONENT NAME
ipa_dnsrecord
ANSIBLE VERSION
ansible 2.9.9
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.6/site-packages/ansible
executable location = /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)]
CONFIGURATION
[root@bastion ~]# ansible-config dump --only-changed
[root@bastion ~]#
OS / ENVIRONMENT
# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.2 (Ootpa)
STEPS TO REPRODUCE
- Create an SRV record
- Add a value to the same record
EXPECTED RESULTS
- You should have two record or one based on a switch that provide if the record should be replaced or appended.
ACTUAL RESULTS
- The record is updated
Files identified in the description: None
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
@Koma-Andrea: Greetings! Thanks for taking the time to open this issue. In order for the community to handle your issue effectively, we need a bit more information.
Here are the items we could not find in your description:
- component name
Please set the description of this issue with this template: https://raw.githubusercontent.com/ansible/ansible/devel/.github/ISSUE_TEMPLATE/bug_report.md
edit: updated the description as requested
Files identified in the description:
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
cc @Akasurde @Nosmoht @fxfitz click here for bot help
an example where this occur is
base_ipa_dns_entrys:
- name: _etcd-server-ssl._tcp.cloud.domain.com.
domain: domain.com
type: SRV
record: '0 10 2380 etcd-0.cloud.domain.com.'
- name: _etcd-server-ssl._tcp.cloud.domain.com.
domain: domain.com
type: SRV
record: '0 10 2380 etcd-1.cloud.domain.com.'
- name: _etcd-server-ssl._tcp.cloud.domain.com.
domain: domain.com
type: SRV
record: '0 10 2380 etcd-2.cloud.domain.com.'
- name: Add DNS Entries
ipa_dnsrecord:
name: "{{ item.name }}"
zone_name: "{{ item.domain }}"
state: "{{ item.state | default('present') }}"
record_type: "{{ item.type }}"
record_value: "{{ item.record }}"
ipa_host: "{{ ipa_host }}"
ipa_user: "{{ ipa_user }}"
ipa_pass: "{{ ipa_pass }}"
validate_certs: false
loop: "{{ base_ipa_dns_entries }}"
this does not result in a srv record containing the valid wanted 3 records
this results in a srv record with the last item as record
cc @justchris1 click here for bot help
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.