Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: linode.cloud.domain_record is not idempotent #635

Open
macno opened this issue Dec 27, 2024 · 1 comment
Open

[Bug]: linode.cloud.domain_record is not idempotent #635

macno opened this issue Dec 27, 2024 · 1 comment
Labels
bug issues that report a bug

Comments

@macno
Copy link

macno commented Dec 27, 2024

Ansible Version

ansible [core 2.17.5]

Ansible Configuration

CALLBACKS_ENABLED(/ansible/ansible.cfg) = ['community.general.slack', 'community.general.opentelemetry']
CONFIG_FILE() = /ansible/ansible.cfg
DEFAULT_HOST_LIST(/ansible/ansible.cfg) = ['/ansible/inventory']
DEFAULT_REMOTE_USER(/ansible/ansible.cfg) = ansibleusr
HOST_KEY_CHECKING(/ansible/ansible.cfg) = False
INTERPRETER_PYTHON(/ansible/ansible.cfg) = /usr/bin/python3

Effected Components

domain_record

Expected Behavior

playbook runs every time without error nor changes (except the first time)

Actual Behavior

playout fails after the first run with error failed to create domain record: POST /v4/domains/[redacted]/records: [400] name: Record conflict - CNAMES must be unique

Steps to Reproduce

execute multiple times the following playbook

---
- name: Test linode.cloud.domain_record
  hosts: localhost
  become: false
  tasks:
    - name: Ensure CNAME record is aligned
      linode.cloud.domain_record:
        domain: example.com
        name: smtp
        type: CNAME
        target: mail.example.com.
        ttl_sec: 1800
        state: present
@macno macno added the bug issues that report a bug label Dec 27, 2024
@macno
Copy link
Author

macno commented Dec 27, 2024

looks like the problem is with the final dot in the target value:

target: mail.example.com.
                     ---^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues that report a bug
Projects
None yet
Development

No branches or pull requests

1 participant