OK.  Haven't touched Windows Server for a couple of years.  :)
I searched the azure modules in ansible and like you, did not see anything 
directly related.  My suggestion: since you already have a poweshell 
command to create the account, use the win_command module to run the 
powershell command where needed.  That will probably be your fastest method 
to get your task accomplished.

On Tuesday, October 9, 2018 at 6:20:13 AM UTC-4, ameya agashe wrote:

> Hi Brad,
>
> Appreciate your prompt response.Azure is a public cloud offering from 
> Microsoft. WIthout Ansible, I would create the account with "Azure 
> PowerShell" with the below command.:
>
> New-AzureRmAutomationAccount `
> -ResourceGroupName "${resource_grp_name_fred_nxt_old_prod}" `
> -Name "${azure_automation_account_name}" `
> -Location "${automation_account_location}"
>
> What I have done so far is, I am being able to provision a base Windows 
> 2016 Server in Azure, I want to now, automate the manual configuration 
> task, first thing is to provision an automation account. The below snippet 
> is of my yaml file which I run in Azure cloud shell and it provisions the 
> environment.
>
>
> - name: Create Azure VM
> hosts: localhost
> connection: local
> tasks:
> - name: Create resource group
> azure_rm_resourcegroup:
> name: myResourceGroup
> location: eastus
> - name: Create virtual network
> azure_rm_virtualnetwork:
> resource_group: myResourceGroup
> name: myVnet
> address_prefixes: "10.0.0.0/16"
> - name: Add subnet
> azure_rm_subnet:
> resource_group: myResourceGroup
> name: mySubnet
> address_prefix: "10.0.1.0/24"
> virtual_network: myVnet
> - name: Create public IP address
> azure_rm_publicipaddress:
> resource_group: myResourceGroup
> allocation_method: Static
> name: myPublicIP
> register: output_ip_address
> - name: Dump public IP for VM which will be created
> debug:
> msg: "The public IP is {{ output_ip_address.state.ip_address }}."
> - name: Create Network Security Group that allows RDP
> azure_rm_securitygroup:
> resource_group: myResourceGroup
> name: myNetworkSecurityGroup
> rules:
> - name: RDP
> protocol: Tcp
> destination_port_range: 3389
> access: Allow
> priority: 1002
> direction: Inbound
> - name: Create virtual network inteface card
> azure_rm_networkinterface:
> resource_group: myResourceGroup
> name: myNIC
> virtual_network: myVnet
> subnet: mySubnet
> public_ip_name: myPublicIP
> security_group: myNetworkSecurityGroup
> - name: Create VM
> azure_rm_virtualmachine:
> resource_group: myResourceGroup
> name: myVM
> vm_size: Standard_DS1_v2
> admin_username: svc_admin
> admin_password: Hash#Dollar$135
> os_type: Windows
> network_interfaces: myNIC
> image:
> offer: WindowsServer
> publisher: MicrosoftWindowsServer
> sku: '2016-Datacenter'
> version: latest
>
>
> The main game, as I see is using Azure ansible modules, I couldn't locate 
> the equivalent to create an automation account.
>
> Kindly assist
>
> Thanks
> Ameya Agashe
>
>
> On Tue, Oct 9, 2018 at 8:36 PM Brad Van Orden <[email protected] 
> <javascript:>> wrote:
>
>> No, I have no idea what azure is.  So, can't offer any help.  You have 
>> not provided any details.  Possibly describe what the process is for 
>> creating an azure account without ansible and what problems you are having 
>> with using ansible.  Give us the steps you have attempted so far.  
>>
>> On Monday, October 8, 2018 at 7:34:29 PM UTC-4, ameya agashe wrote:
>>>
>>> Hi is this message gone in spam somewhere??
>>>
>>> Ameya
>>>
>>> On Fri, Oct 5, 2018 at 2:37 PM ameya agashe <[email protected]> wrote:
>>>
>>>> Apparently, there is no module for creation of azure automation account?
>>>>
>>>> On Fri, Oct 5, 2018 at 12:51 PM ameya agashe <[email protected]> 
>>>> wrote:
>>>>
>>>>> Hi Guys,
>>>>>
>>>>> Are we not able to create an Azure automation account with Ansible? 
>>>>> Seems a simple request but I am not able to figure it out.
>>>>>
>>>>> Would appreciate your guidance.
>>>>>
>>>>> Thank you very much.
>>>>>
>>>>> Kind regards
>>>>> Ameya Agashe
>>>>>
>>>>> P. S: Kindly ignore if this sounds too simple question, I am new to 
>>>>> Ansible world.
>>>>>
>>>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/ea661cef-a889-45d0-a88b-0b1d067b4f14%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/ea661cef-a889-45d0-a88b-0b1d067b4f14%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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/a12c8a97-da93-40fd-be2e-33e1b4d2e027%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to