Hi All,

I need your assistance to resolve this issue.

Error details when I run in -vvv option:

Using module file
/opt/ansible/local/lib/python2.7/site-packages/ansible/modules/windows/win_feature.py
<127.0.0.1> PUT /home/ameya/.ansible/tmp/ansible-local-1269sNJo2N/tmpn6Pzqa
TO
/home/ameya/.ansible/tmp/ansible-tmp-1539310211.52-28225992127736/win_feature.py
<127.0.0.1> PUT /home/ameya/.ansible/tmp/ansible-local-1269sNJo2N/tmpE9GgM5
TO /home/ameya/.ansible/tmp/ansible-tmp-1539310211.52-28225992127736/args
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x
/home/ameya/.ansible/tmp/ansible-tmp-1539310211.52-28225992127736/
/home/ameya/.ansible/tmp/ansible-tmp-1539310211.52-28225992127736/win_feature.py
/home/ameya/.ansible/tmp/ansible-tmp-1539310211.52-28225992127736/args &&
sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/opt/ansible/bin/python2
/home/ameya/.ansible/tmp/ansible-tmp-1539310211.52-28225992127736/win_feature.py
/home/ameya/.ansible/tmp/ansible-tmp-1539310211.52-28225992127736/args &&
sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r
/home/ameya/.ansible/tmp/ansible-tmp-1539310211.52-28225992127736/ >
/dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
    "changed": false,
    "module_stderr": "",
    "module_stdout": "",
    "msg": "MODULE FAILURE",
    "rc": 0
}

My Ansible yaml file is below, note it's not an idea yaml but I want to get
a base build working

- name: Create Azure VM
  hosts: localhost
  connection: local
  tasks:
  - name: Create resource group
    azure_rm_resourcegroup:
      name: rg_networking
      location: australiasoutheast
  - name: Create virtual network
    azure_rm_virtualnetwork:
      resource_group: rg_networking
      name: vmnet_groups_preprod
      address_prefixes: "10.97.0.0/16"
  - name: Add subnet
    azure_rm_subnet:
      resource_group: rg_networking
      name: subnet_ax
      address_prefix: "10.97.3.0/24"
      virtual_network: vmnet_groups_preprod
  - name: Create public IP address
    azure_rm_publicipaddress:
      resource_group: rg_networking
      allocation_method: Static
      name: NXTPREPWEB-1_IP
    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: rg_networking
      name: nsg_subnet_ax
      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: rg_networking
      name: subnet_ax_iis_nic-1
      virtual_network: vmnet_groups_preprod
      subnet: subnet_ax
      public_ip_name: NXTPREPWEB-1_IP
      security_group: nsg_subnet_ax
  - name: Create VM
    azure_rm_virtualmachine:
      resource_group: rg_networking
      name: NXTPREPWEB-1
      vm_size: Standard_DS1_v2
      admin_username: axlocaladmin
      admin_password: Hash#Dollar$135
      os_type: Windows
      network_interfaces: subnet_ax_iis_nic-1
      image:
        offer: WindowsServer
        publisher: MicrosoftWindowsServer
        sku: '2016-Datacenter'
        version: latest
  - name: Install IIS (Web-Server and Web-Common-Http)
    win_feature:
      name:
      - Web-Server
      - Web-Common-Http
      state: present

  - name: Install IIS Web-Server with sub features and management tools
    win_feature:
      name: Web-Server
      state: present
      include_sub_features: True
      include_management_tools: True
      register: win_feature

  - name: reboot if installing Web-Server feature requires it
    win_reboot:
    when: win_feature.reboot_required

Would appreciate any assistance offered.

Kind Regards,
Ameya Agashe

-- 
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/CAG9tf-_bw8q5gGV045yR%2BxC6spF70%3D1%2B%3Do4OS%3D0JHjPfE%2BkY0w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to