ansible-collections / azure

Development area for Azure Collections
https://galaxy.ansible.com/azure/azcollection
GNU General Public License v3.0
248 stars 332 forks source link

couldn't resolve module/action 'azure_rm_privatednszone #631

Closed bkatsnel closed 3 years ago

bkatsnel commented 3 years ago

I am running ansible 2.11.4 using python 3.8.12 virtual environment and azure collection 1.9. A number of azure_rm is working fine but I am getting "couldn't resolve module/action 'azure_rm_privatednszone" for

The error appears to be in '/u01/postgres/ansible/test/test_private_dns.yml': line 19, column 7, but may be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Create Private DNS
  ^ here
nbr23 commented 3 years ago

@bkatsnel I think you might be missing az before collection. Try with this module name: azure.azcollection.azure_rm_privatednszone

bkatsnel commented 3 years ago

Thanks, nbr23. I did try it before without success. Do you see the same problem in your environment?

Akasurde commented 3 years ago

@bkatsnel Can you please paste the output for ansible-galaxy collection list?

bkatsnel commented 3 years ago

Collection Version


amazon.aws 1.5.0 ansible.netcommon 2.4.0 ansible.posix 1.3.0 ansible.utils 2.4.0 ansible.windows 1.7.2 arista.eos 2.2.0 awx.awx 19.2.2 azure.azcollection 1.9.0 check_point.mgmt 2.0.0 chocolatey.chocolatey 1.1.0 cisco.aci 2.0.0 cisco.asa 2.0.3 cisco.intersight 1.0.17 cisco.ios 2.4.0 cisco.iosxr 2.4.0 cisco.meraki 2.4.2 cisco.mso 1.2.0 cisco.nso 1.0.3 cisco.nxos 2.5.1 cisco.ucs 1.6.0 cloudscale_ch.cloud 2.2.0 community.aws 1.5.0 community.azure 1.0.0 community.crypto 1.9.2 community.digitalocean 1.9.0 community.docker 1.9.1 community.fortios 1.0.0 community.general 3.6.0 community.google 1.0.0 community.grafana 1.2.1 community.hashi_vault 1.3.2 community.hrobot 1.1.1 community.kubernetes 1.2.1 community.kubevirt 1.0.0 community.libvirt 1.0.2 community.mongodb 1.3.1 community.mysql 2.1.1 community.network 3.0.0 community.okd 1.1.2 community.postgresql 1.4.0 community.proxysql 1.2.0 community.rabbitmq 1.1.0 community.routeros 1.2.0 community.skydive 1.0.0 community.sops 1.1.0 community.vmware 1.13.0 community.windows 1.6.0 community.zabbix 1.4.0 containers.podman 1.7.0 cyberark.conjur 1.1.0 cyberark.pas 1.0.7 dellemc.enterprise_sonic 1.1.0 dellemc.openmanage 3.6.0 dellemc.os10 1.1.1 dellemc.os6 1.0.7 dellemc.os9 1.0.4 f5networks.f5_modules 1.11.0 fortinet.fortimanager 2.1.3 fortinet.fortios 2.1.2 frr.frr 1.0.3 gluster.gluster 1.0.1 google.cloud 1.0.2 hetzner.hcloud 1.6.0 hpe.nimble 1.1.3 ibm.qradar 1.0.3 infinidat.infinibox 1.2.4 inspur.sm 1.3.0 junipernetworks.junos 2.5.0 kubernetes.core 1.2.1 mellanox.onyx 1.0.0 netapp.aws 21.6.0 netapp.azure 21.8.1 netapp.cloudmanager 21.9.0 netapp.elementsw 21.6.1 netapp.ontap 21.10.0 netapp.um_info 21.7.0 netapp_eseries.santricity 1.2.13 netbox.netbox 3.1.1 ngine_io.cloudstack 2.1.0 ngine_io.exoscale 1.0.0 ngine_io.vultr 1.1.0 openstack.cloud 1.5.0 openvswitch.openvswitch 2.0.0 ovirt.ovirt 1.6.2 purestorage.flasharray 1.10.0 purestorage.flashblade 1.6.0 sensu.sensu_go 1.12.0 servicenow.servicenow 1.0.6 splunk.es 1.0.2 t_systems_mms.icinga_director 1.21.1 theforeman.foreman 2.2.0 vyos.vyos 2.5.1 wti.remote 1.0.1

Fred-sun commented 3 years ago

Thanks, nbr23. I did try it before without success. Do you see the same problem in your environment?

@bkatsnel I tried it. It worked on my end. Please try as following. Thank you very much!


---
- name: Using Azure collection
  hosts: localhost
  connection: local
  vars:
    resource_group: v-xisuRG
    domain_name: v-xisuRGname
  tasks:
    - name: Create a private DNS zone
      azure.azcollection.azure_rm_privatednszone:
        resource_group: "{{ resource_group }}"
        name: "{{ domain_name }}.com"
bkatsnel commented 3 years ago

Please, share ansible --version output

bkatsnel commented 3 years ago

The problem was resolved. By the following steps

  1. recreate virtual environment
  2. reinstall ansible and required modules for azure collection
  3. fully qualified module call like was suggested - azure.azcollection.azure_rm_privatednszone
  4. the confusing part is that many azure modules do not need azure.azcollection qualifier

Thanks everyone who tried to help.