Git Product home page Git Product logo

Comments (3)

rhounsell avatar rhounsell commented on September 13, 2024

We are experiencing similar behaviour when trying to add a CNAME to a DNS forward lookup table using community.windows.win_dns_record. Occasionally, the CNAME will simply not be present when examining the DNS configuration in the DNS Manager dialog of the Server Manager tool. No error indication of any kind.

Ansible [core 2.16.7]
python version 3.10.12
jinja version 3.1.4
libyaml = true

community.windows 2.2.0

from community.windows.

qgmathieu avatar qgmathieu commented on September 13, 2024

Same here, we tried adding type A records. The module is showing state changed with no errors, and if we replay it, it's green with OK state. However no DNS entry was created in our DNS server.

Here is how we use the module :

- name: Create a DNS record
  community.windows.win_dns_record:
    name: "mytest.mydomain.com"
    computer_name: "{{ my_dns_server_private_ip }}"
    type: "A"
    value: "{{ mytest_private_ip }} "
    zone: "mydomain.com"
  delegate_to: "{{ my_windows_server }}
  vars:
    ansible_user: {{ my_user }}
    ansible_password: "{{ my_password }}"
    ansible_connection: winrm
    ansible_port: 5986
    ansible_winrm_transport: credssp
    ansible_winrm_server_cert_validation: ignore

ansible [core 2.15.8]
python version = 3.9.19
jinja version = 3.1.4
libyaml = True
community.windows 2.2.0

from community.windows.

qgmathieu avatar qgmathieu commented on September 13, 2024

We found what our issue was. It turns out that when creating a type A record, you MUST remove the domain from the "name" field (similarly to CNAME records), contrary to what the example in the official documentation says :

The official doc example :

- name: Create database server record
  community.windows.win_dns_record:
    name: "cgyl1404p.amer.example.com"    --->  Does not work
    type: "A"
    value: "10.1.1.1"
    zone: "amer.example.com"

What you should do instead :

 - name: Create database server record
   community.windows.win_dns_record:
    name: "cgyl1404p"        ---> Works
    type: "A"
    value: "10.1.1.1"
    zone: "amer.example.com"

Leaving this here in case it helps someone.

from community.windows.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.