Browse Source
Merge pull request #2529 from dvazar/bugfix/azurerm_generate_inventory
Fixed inventory file creation
pull/2534/head
Andreas Krüger
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
contrib/azurerm/roles/generate-inventory_2/templates/inventory.j2
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
|
|
|
{% for vm in vm_ip_list %} |
|
|
|
{% if not use_bastion or vm.virtualMachinename == 'bastion' %} |
|
|
|
{% if not use_bastion or vm.virtualMachine.name == 'bastion' %} |
|
|
|
{{ vm.virtualMachine.name }} ansible_ssh_host={{ vm.virtualMachine.network.publicIpAddresses[0].ipAddress }} ip={{ vm.virtualMachine.network.privateIpAddresses[0] }} |
|
|
|
{% else %} |
|
|
|
{{ vm.virtualMachine.name }} ansible_ssh_host={{ vm.virtualMachine.network.privateIpAddresses[0] }} |
|
|
|