diff --git a/lib/ansible/modules/cloud/azure/azure.py b/lib/ansible/modules/cloud/azure/azure.py index 60cdbbe047..aca6e719eb 100644 --- a/lib/ansible/modules/cloud/azure/azure.py +++ b/lib/ansible/modules/cloud/azure/azure.py @@ -146,46 +146,43 @@ EXAMPLES = ''' # Note: None of these examples set subscription_id or management_cert_path # It is assumed that their matching environment variables are set. -# Provision virtual machine example -- local_action: - module: azure +- name: Provision virtual machine example + azure: name: my-virtual-machine role_size: Small image: b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu_DAILY_BUILD-precise-12_04_3-LTS-amd64-server-20131205-en-us-30GB - location: 'East US' + location: East US user: ubuntu ssh_cert_path: /path/to/azure_x509_cert.pem storage_account: my-storage-account - wait: yes + wait: True + state: present + delegate_to: localhost -# Terminate virtual machine example -- local_action: - module: azure +- name: Terminate virtual machine example + azure: name: my-virtual-machine state: absent + delegate_to: localhost -#Create windows machine -- hosts: all - connection: local - tasks: - - local_action: - module: azure - name: "ben-Winows-23" - hostname: "win123" - os_type: windows - enable_winrm: yes - subscription_id: "{{ azure_sub_id }}" - management_cert_path: "{{ azure_cert_path }}" - role_size: Small - image: 'bd507d3a70934695bc2128e3e5a255ba__RightImage-Windows-2012-x64-v13.5' - location: 'East Asia' - password: "xxx" - storage_account: benooytes - user: admin - wait: yes - virtual_network_name: "{{ vnet_name }}" - - +- name: Create windows machine + azure: + name: ben-Winows-23 + hostname: win123 + os_type: windows + enable_winrm: True + subscription_id: '{{ azure_sub_id }}' + management_cert_path: '{{ azure_cert_path }}' + role_size: Small + image: bd507d3a70934695bc2128e3e5a255ba__RightImage-Windows-2012-x64-v13.5 + location: East Asia + password: xxx + storage_account: benooytes + user: admin + wait: True + state: present + virtual_network_name: '{{ vnet_name }}' + delegate_to: localhost ''' import base64