воскресенье, 24 февраля 2019 г.

Run Ansible in VSCode on Windows 10 (via WSL + Terminal + pip)

Short instruction how to setup VSCode to execute Ansible playbooks directly from Terminal


Install WSL in Windows

Download Ubuntu terminal

Open VSCode and set WSL ans default terminal

Create new Terminal
Check which terminal is it now in use
cat /etc/issue
Update
apt update

Install pip
apt install python3-pip

Install Ansible
pip3 install ansible

Testing

Create hosts file
cat > 192.168.1.20 ./hosts

(that host should have ansible installed)

Ping
ansible -i ./hosts all -u root -k -m ping

* when it prompts you for a password - the the password for the remote host you're pinging ...

Комментариев нет:

Отправить комментарий