ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
822 stars 1.52k forks source link

Cannot set priority for MX records with cloudflare_dns #4763

Open manuviens opened 2 years ago

manuviens commented 2 years ago

Summary

  - name: 'Configuration MX'
    record: 'example.com'
    type: MX
    value: 'mail.example.com'
    priority: 5
    state: present

The above task creates a MX record with a priority value of 1 instead of 5.

Issue Type

Bug Report

Component Name

community.general.cloudflare_dns

Ansible Version

$ ansible --version
ansible 2.10.7
  config file = /home/manu/src/drave/ansible/ansible.cfg
  configured module search path = ['/home/manu/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/manu/.local/lib/python3.8/site-packages/ansible
  executable location = /home/manu/.local/bin/ansible
  python version = 3.8.10 (default, Mar 15 2022, 12:22:08) [GCC 9.4.0]

Community.general Version

$ ansible-galaxy collection list community.general
# /home/manu/.local/lib/python3.8/site-packages/ansible_collections
Collection        Version
----------------- -------
community.general 2.2.0  

# /home/manu/.ansible/collections/ansible_collections
Collection        Version
----------------- -------
community.general 2.5.1  

Configuration

$ ansible-config dump --only-changed
ANSIBLE_PIPELINING(~/src/drave/ansible/ansible.cfg) = True
CACHE_PLUGIN(~/src/drave/ansible/ansible.cfg) = jsonfile
CACHE_PLUGIN_CONNECTION(~/src/drave/ansible/ansible.cfg) = $HOME/.cache/ansible/
DEFAULT_FORKS(~/src/drave/ansible/ansible.cfg) = 20
DEFAULT_GATHERING(~/src/drave/ansible/ansible.cfg) = smart
DEFAULT_HOST_LIST(~/src/drave/ansible/ansible.cfg) = ['~/src/drave/ansible-vars/inventory/hosts.yml']
DEFAULT_ROLES_PATH(~/src/drave/ansible/ansible.cfg) = ['~/src/drave/ansible/roles']

OS / Environment

Distributor ID: Linuxmint Description: Linux Mint 20.3 Release: 20.3 Codename: una

Steps to Reproduce

see code in summary

Expected Results

The task creates a MX record with a priority value of 1 instead of 5.

Actual Results

MX record created with priority of 1.

Code of Conduct

ansibullbot commented 2 years ago

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.

click here for bot help

ansibullbot commented 2 years ago

cc @mgruener click here for bot help

russoz commented 2 years ago

@manuviens Thanks for submitting this issue.

Taking a first look, it seems that the module passes the value straight from the parameters to the API. Could you please:

ansibullbot commented 1 year ago

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.

click here for bot help