The WinRM services listens for requests on one or more ports. Each of these ports must have a listener created and configured. To view the current listeners that are running on the WinRM service, run the following command:
winrm enumerate winrm/config/Listener
Inventory file - inventory.yml
[Sprint-ETT]
172.30.12.176
[Sprint-ETT:vars]
ansible_user=lakshan-a
ansible_password=xxxx
ansible_port=5986
ansible_connection=winrm
ansible_winrm_transport=ntlm
ansible_winrm_server_cert_validation=ignore
After setup inventory to test with the server using Ansible playbook
To run ansible playbook use this command
ansible-playbook -i inventory ping.yaml
IIS.yaml
Checking the Windows roles and features on the list
Installing Windown roles and features using Ansible Playbook
IISSites.yaml
Adding IIS sites using Ansible playbook
Installing IIS sties using Ansible Playbook
Install Softwares using Ansible Playbook
playbooksoftware.yaml
To configure Ansible with Deployment Server
Create a Folder Structure for the Ansible Server.
mkdir Ansible
cd Ansible
pwd
/home/ubuntu/Ansible
Then Go to the Ansible Folder
Create a folder ETT and its subfolder to create Sprint,Stage,UAT,SBX,Prod
mkdir ETT
cd ETT
mkdir Sprint, Stage, UAT, SBX, Prod
goto the Sprint folder and create inventory file
vi inventory
[ETT]
172.30.61.27
Then create ansible.cfg file in that folder
vi ansible.cfg
[defaults]
inventory = ./inventory
roles_path = ./roles
Then create group_vars folder then create ‘all’ file inside that folder
mkdir group_vars
cd group_vars
vi all
ansible_user: lakshan-a
ansible_password: a306&6A0pa9n
ansible_port: 5986
ansible_connection: winrm
ansible_winrm_scheme: https
ansible_winrm_server_cert_validation: ignore
ansible_winrm_transport: ntlm
#Nexus
nexus_username: devopsnexus
nexus_password: Admin1234
base_dir: 'D:\ETT-Application'
backup: 'D:\ETT-ApplicationBackup'
Want to print your doc? This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (