-
Notifications
You must be signed in to change notification settings - Fork 320
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
azure_rm_dnszone fails when using private DNS zones #87
Comments
I confirm this problem. |
Guys, Could you please check if you can create from the Azure Portal? From my side, it is working fine: ansible -i inventories/local/hosts localhost -m azure_rm_dnszone -a "resource_group=rg name=private.example.com state=present type=private" localhost | CHANGED => {
"changed": true,
"check_mode": false,
"state": {
"id": "/subscriptions/hidden/resourceGroups/rg/providers/Microsoft.Network/dnszones/private.example.com",
"name": "private.example.com",
"name_servers": null,
"number_of_record_sets": 1,
"registration_virtual_networks": null,
"resolution_virtual_networks": null,
"type": "private"
}
}
|
@bit4man My test is also OK, could you tell me how you met this question? Thank you very much!
|
@imjoseangel Note I'm uzing AzureUSGovernment - not the commercial end point. When I use the azure portal it's "portal.azure.us" - and I can create and link private DNS zones on the portal side (a few weeks back I could not). I don't have all the data at my finger tips, but the API and implementation of PrivateDNS has changed very recently on AzureUSGov and it looks like the old implementation is no longer available. |
Thank you @bit4man . Could you please test specifiying the - name: Create a DNS zone
azure_rm_dnszone:
resource_group: rg
name: private.example.com
type: private
cloud_environment: AzureUSGovernment or ansible -i inventories/local/hosts localhost -m azure_rm_dnszone -a "resource_group=rg name=private.example.com state=present type=private cloud_environment=AzureUSGovernment" Thank you! |
@bit4man Dns zones and private Dns are two different modules, in which Dns zones(type: public and private). You can refer to the following two links. thank you! |
@haiyuazhang Could you please help confirm whether a new module azure_rm_dnsprivatezone needs to be added to distinguish between DNS zone and private DNS? Thank you very much! |
@Fred-sun Yes, a private DNS can no longer be created via this module, so a new module need to be |
@haiyuazhang Thanks for your feedback. Will you add this module? Thank you! |
@haiyuazhang @Fred-sun Do you want me to work in the module? I will need you @haiyuazhang to test it. |
@imjoseangel Welcome you work to add this module. I will test when you finish change! Thank you very much! |
@Fred-sun PR #122 created. As soon as we test and merge this, I will work in the info one. I have kept the name as azure_rm_privatednszone instead of azure_rm_dnsprivatezone to maintain naming consistency with Azure SDK. Tell me if you agree or you prefer to rename the module. Thank you very much for your help! |
I also have developed the azure_rm_privatednszone_info. As soon as we get this merged, I will create a new PR. Have a nice rest of the weekend |
@imjoseangel Sorry reply you later, we will review and advance the merger as soon as possible. Thank you! |
SUMMARY
Trying to create a private DNS Zone:
$ ansible -i inventory localhost -m azure_rm_dnszone -a "resource_group=rg name=private.example.com state=present type=private"
[WARNING]: Azure API profile latest does not define an entry for DnsManagementClient
localhost | FAILED! => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python3"
},
"changed": false,
"msg": "Error creating or updating zone rhocp.us - Operation failed with status: 'Bad Request'. Details: The feature you are trying to use is not available."
}
ISSUE TYPE
COMPONENT NAME
azure_rm_dnszone
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Fedora 31
STEPS TO REPRODUCE
Run the command in the summary
$ ansible -i inventory localhost -m azure_rm_dnszone -a "resource_group=rg name=private.example.com state=present type=private"
EXPECTED RESULTS
Zone created or data for existing zone returned.
ACTUAL RESULTS
Error: The feature you are trying to use is not available.
The text was updated successfully, but these errors were encountered: