Closed
Description
Summary
in the cloudflare_dns module, the SSHFP type is queried wrong when it detects if it exists
Issue Type
Bug Report
Component Name
cloudflare_dns
Ansible Version
$ ansible --version
ansible [core 2.16.0]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/km/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/km/.local/pipx/venvs/ansible/lib/python3.12/site-packages/ansible
ansible collection location = /home/km/.ansible/collections:/usr/share/ansible/collections
executable location = /home/km/.local/bin/ansible
python version = 3.12.0 (main, Oct 28 2023, 18:04:38) [GCC 12.2.0] (/home/km/.local/pipx/venvs/ansible/bin/python)
jinja version = 3.1.2
libyaml = True
Community.general Version
$ ansible-galaxy collection list community.general
Collection Version
----------------- -------
community.general 8.0.2
Configuration
$ ansible-config dump --only-changed
CONFIG_FILE() = /etc/ansible/ansible.cfg
DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = ['/etc/ansible/prod.bw.yml', '/etc/ansible/hosts']
VARIABLE_PLUGINS_ENABLED(/etc/ansible/ansible.cfg) = ['bw_vars']
OS / Environment
WSL2
Steps to Reproduce
Run it twice and the second fails because it's already there
- name: Create a SSHFP record login.example.com
community.general.cloudflare_dns:
zone: "{{ ansible_domain }}"
record: "{{ ansible_hostname }}"
type: SSHFP
algorithm: 1
hash_type: 2
value: ASDF
api_token: xxxxxxxxxxxxxxxxxx
Never works as the lookup is wwring
- name: Removea SSHFP record login.example.com
community.general.cloudflare_dns:
zone: "{{ ansible_domain }}"
record: "{{ ansible_hostname }}"
type: SSHFP
algorithm: 1
hash_type: 2
value: ASDF
state: "absent"
api_token: xxxxxxxxxxxxxxxxxx
Expected Results
- That second time would be no change
- The record would be deleted
Actual Results
- API error as the record already exists
- It thinks the record is gone so nochange
Code of Conduct
- I agree to follow the Ansible Code of Conduct
Activity