ansible / ansible-modules-core

Ansible modules - these modules ship with ansible
1.3k stars 1.95k forks source link

azure_rm_virtualmachine: error when specifying parameter subnet_name #4441

Closed pmarques closed 7 years ago

pmarques commented 8 years ago
ISSUE TYPE

cloud/azure/azure_rm_virtualmachine.py

ANSIBLE VERSION
ansible 2.1.1.0
CONFIGURATION
$ pip freeze | grep azure

azure==2.0.0rc5
azure-batch==0.30.0rc5
azure-common==1.1.4
azure-graphrbac==0.30.0rc5
azure-mgmt==0.30.0rc5
azure-mgmt-authorization==0.30.0rc5
azure-mgmt-batch==0.30.0rc5
azure-mgmt-cdn==0.30.0rc5
azure-mgmt-cognitiveservices==0.30.0rc5
azure-mgmt-commerce==0.30.0rc5
azure-mgmt-common==0.20.0
azure-mgmt-compute==0.30.0rc5
azure-mgmt-keyvault==0.30.0rc5
azure-mgmt-logic==0.30.0rc5
azure-mgmt-network==0.30.0rc5
azure-mgmt-notificationhubs==0.30.0rc5
azure-mgmt-nspkg==1.0.0
azure-mgmt-powerbiembedded==0.30.0rc5
azure-mgmt-redis==0.30.0rc5
azure-mgmt-resource==0.30.0rc5
azure-mgmt-scheduler==0.30.0rc5
azure-mgmt-storage==0.30.0rc5
azure-mgmt-web==0.30.0rc5
azure-nspkg==1.0.0
azure-servicebus==0.20.2
azure-servicemanagement-legacy==0.20.3
azure-storage==0.32.0
msrestazure==0.4.1
OS / ENVIRONMENT

Mac OS X

SUMMARY

Using azure_rm_virtualmachine module to deploy a new virtual machine that specifies a subnet_name throws an error

fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Error: fetching subnet my_subnet - get() takes at least 4 arguments (3 given)"}
STEPS TO REPRODUCE

Deploy a azure virtual machine using the playbook bellow.


---

- hosts: localhost
  connection: local
  tasks:
    - name: "Create dockuwiki server (bitnami)"
      azure_rm_virtualmachine:
        name: "dokuwiki"
        resource_group: "ripe-admin"
        short_hostname: "dokuwiki"
        subnet_name: "ripe_subnet"
        os_type: "Linux"
        image:
          offer: "dokuwiki"
          publisher: "bitnami"
          sku: "20150810a"
          version: "latest"
        vm_size: "Basic_A0"
        admin_username: "wiki"
        ssh_password_enabled: No
        ssh_public_keys:
        - path: "/home/wiki/.ssh/authorized_keys"
          key_data: "{{ lookup('file', '/tmp/ssh.id_rsa.pub') }}"
        started: No
        state: "present"
EXPECTED RESULTS

Expected to deploy a new virtual machine

ACTUAL RESULTS
PLAY [localhost] ***************************************************************

TASK [setup] *******************************************************************
ok: [localhost]

TASK [Create dockuwiki server (bitnami)] ***************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Error: fetching subnet ripe_subnet - get() takes at least 4 arguments (3 given)"}

PLAY RECAP *********************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1   
ansibot commented 8 years ago

@ansible ping, this issue is waiting for your response. click here for bot help

ansibot commented 8 years ago

@ansible, ping. This issue is still waiting on your response. click here for bot help

ansibot commented 7 years ago

@ansible, ping. This issue is still waiting on your response. click here for bot help

ansibot commented 7 years ago

@ansible, ping. This issue is still waiting on your response. click here for bot help

ansibot commented 7 years ago

@ansible, ping. This issue is still waiting on your response. click here for bot help

ansibot commented 7 years ago

@ansible, ping. This issue is still waiting on your response. click here for bot help

ansibot commented 7 years ago

This repository has been locked. All new issues and pull requests should be filed in https://github.com/ansible/ansible

Please read through the repomerge page in the dev guide. The guide contains links to tools which automatically move your issue or pull request to the ansible/ansible repo.

ansibot commented 7 years ago

This issue was migrated to https://github.com/ansible/ansible/issues/29709