Login to created Windows instance using Ansible -


i creating windows instance using ansible. once instance got created need install iis on created instance automatically.

how login newly created instance automatically?

what parameters need mention in host (inventory) file login?

everything in docs.

prerequisites (powershell on target machine):

set-netconnectionprofile -interfacealias ethernet0 -networkcategory private enable-psremoting iwr https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/configureremotingforansible.ps1 -usebasicparsing | iex 

group_vars file group_vars/server:

ansible_user: administrator ansible_password: secret ansible_port: 5986 ansible_connection: winrm 

inventory file:

[server] 192.168.1.2 

playbook:

--- - name: install iis   hosts: server   gather_facts: false   tasks:     - name: install iis       win_feature:         name: "web-server"         state: present         restart: yes         include_sub_features: yes         include_management_tools: yes 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -