Comments (3)
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.
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.
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)
- iis_webbinding IPv6 Problem
- improper string handling (evaluation) in community.windows.win_timezone
- Security scanners flag tests/integration/targets/win_psmodule_info/files/ansiblevault.0.3.0.nupkg
- user account not set correctly in created scheduled task when user is a domain user.
- Provide ability to add DHCP Options to win_dhcp_lease
- Provide ability to create a DHCP Scope
- Support IPv6 in win_dhcp_lease
- "The DISM PS module needs to be installed, this can be done through the windows-adk chocolately package" HOT 1
- Windows privileges to use the windows.win_dns_record module
- win_iis_webapplication is not idempotent. Absent state does not work as expected.
- Invalid error with the win_unzip module when attempting to unzip a zip file
- win_unzip breaks when using beta Pscx version 4
- win_iis_webapppool cannot add multiple env vars
- Can not create scheduled task that runs only on last day of month
- Win_hotfix module fails to install cumulative update for Windows 11
- win_credential creates credentials for the become user HOT 2
- Unable to Install 'VirtualMachinePlatform' Feature on Windows Server 2022 using win_feature Module HOT 1
- adding "use_system_account" to work with GMSA accounts HOT 1
- win_feature : possibility to bypass WSUS server
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from community.windows.