Hi,
I created playbook which deploy Centos VM in azure. It is working fine.
I want in this playbook to install application on that deployed VM. How can
I continue with this playbook and install application on this VM?
Below the playbook I am using:
---
- name: Create Azure VM
hosts: 127.0.0.1
connection: local
gather_facts: False
tasks:
- name: Azure VM creation
azure_rm_virtualmachine:
name: AnsibleTestVM19
location: 'westus'
admin_username: salfand
admin_password: Netapp123456
resource_group: forAnsible
virtual_network_name: AnsibleVnet
image:
offer: CentOS
publisher: OpenLogic
sku: '7.2'
version: latest
register : azure
- name : Debug Azure output
debug :
var : azure
- name: Wait for SSH to come up
wait_for: host="{{
azure_vm.properties.networkProfile.networkInterfaces[0].properties.ipConfigurations[0].properties.publicIPAddress.properties.ipAddress
}}" port=22 delay=60 timeout=320 state=started
- name: Get VM information
blockinfile:
create: yes
dest: /etc/ansible/playbooks/occm_info.txt
block: |
OCCM URL: http://{{
azure_vm.properties.networkProfile.networkInterfaces[0].properties.ipConfigurations[0].properties.publicIPAddress.properties.ipAddress
}}
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/99bce738-324d-41f4-8917-fb7797515aef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.