- Control Panel -> Programs and Features -> Turn Windows features on or off -> Check 'Windows Subsystem for Linux'. Windows will require a reboot.
- Open Microsoft Store and seach for "linux", select Ubuntu and install. If store doesnt work, download manual install package: https://docs.microsoft.com/en-us/windows/wsl/install-manual
- After install run in, you will need to create new user in linux installation
- First update packages:
sudo apt update
- Install Pip:
sudo apt-get -y install python-pip python-dev libffi-dev libssl-dev
- Install Ansible:
pip install ansible --user
- Since the ansible commands are installed under
~/.local/bin
, we need to add that to the$PATH
, so run the command:echo 'PATH=$HOME/.local/bin:$PATH' >> ~/.bashrc
- Update your $PATH to include Ansible:
source .bashrc
- Check installation:
ansible --version
ansible-playbook playbook.yml -i hosts.ini
- If error on connecting to server:
{"msg": "to use the 'ssh' connection type with passwords, you must install the sshpass program"}
fix that with:apt-get install sshpass
it will be
python3-dev