Installing Ansible on Windows through WSL
Requirements: WSL is already setup. Do all the steps below inside the WSL instance
-
Install Ansible & sshpass:
pip install ansible&sudo apt install sshpass -
Generate SSH Keys and Copy:
-
Create Playbook directory:
mkdir ansible_playbooks -
Create Inventory file with the following:
inventory.yml
5. Create playbook file with the follwing:test.yml
-
Run the Playbook:
ansible-playbook -i inventory.ini test.yml