Not able to use full URI in the playbook

12 views
Skip to first unread message

shanmuga Mahalingam

unread,
Feb 16, 2017, 9:33:59 AM2/16/17
to Ansible Project
I tried to specify full URI in the vurtual_network_name and ansible can't find the subnet within the virtual network. 


azure_rm_networkinterface:
  name: testnetworkinfrastructure
  resource_group: testsourcegroup1
  virtual_network_name: /subscriptions/xxxxxxxxxxxxxxxxxxxxx/resourceGroups/testsourcegroup1/providers/Microsoft.Network/virtualNetworks/testvirtualnetwork
  subnet_name: testsubnet
  security_group_name: testsecuritygroup
  location: West Europe
  state: present





failed: [localhost] (item=ansible20-nic-01) => {"failed": true, "item": "ansible20-nic-01", "msg": "Error: fetching subnet testsubnet in virtual network /subscriptions/xxxxxxxxxxxxxxxxxxx/resourceGroups/testsourcegroup1/providers/Microsoft.Network/virtualNetworks/testvirtualnetwork - Azure Error: ResourceNotFound\nMessage: The Resource 'Microsoft.Network/virtualNetworks/subscriptions' under resource group 'testsourcegroup1' was not found."}


Am i doing some thing wrong ?. Or workaround pls ?


Help is much appreciated. 


Thanks,
Shan




Reply all
Reply to author
Forward
0 new messages