Skip to main content

Ansible on Ubuntu 18.04 LTS on Windows 10

Currently Ansible can be run from any machine with Python 2 (version 2.7) or Python 3 (versions 3.5 and higher) installed. Windows isn’t supported for the control node.

Install Ansible on Ubuntu 18.04 LTS on Windows 10's WSL

$ sudo apt install -y ansible

Check Ansible's version

tuyendq@T420:~$ ansible --version
ansible 2.5.1
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/tuyendq/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.15rc1 (default, Nov 12 2018, 14:31:15) [GCC 7.3.0]
tuyendq@T420:~$

Edit Ansible's inventory file /etc/ansible/hosts

tuyendq@T420:~$ sudo vi /etc/ansible/hosts
[practicehabits] 0.practicehabits.net 1.practicehabits.net 2.practicehabits.net

Try pinging all hosts

tuyendq@T420:~$ ansible all -m ping -u tuyendq --private-key=~/.ssh/tuyenid_rsa
0.practicehabits.net | SUCCESS => {
    "changed": false,
    "ping": "pong"
}
2.practicehabits.net | SUCCESS => {
    "changed": false,
    "ping": "pong"
}
1.practicehabits.net | SUCCESS => {
    "changed": false,
    "ping": "pong"
}
tuyendq@T420:~$

Popular posts from this blog

Install Microsoft .NET Core SDK

.NET Core Software Development Kit (SDK) is a set of libraries and tools that allow developers to create .NET Core applications and libraries.

How to charge your device from USB Port

First of all, check BIOS Settings of your laptop or desktop Dell Look for USB PowerShare BIOS Settings: USB PowerShare Lenovo Look for Always On USB Charge in Off Mode BIOS Settings: Enable Always On USB Charge in Off Mode

Kali Linux on Raspberry Pi 2

Download Kali Linux for Raspberry Pi 2 Use xzcat to decompress and then dd to image Kali Linux to microSD on Windows 10. or use 7-zip to extract kali-linux-2019.1-rpi3-nexmon.img image file, then use rufus to write image to microSD card Login Kali Linux with default username root and password toor Tight VNC Server root@kali:~# apt install tightvncserver root@kali:~# vncserver :1 You will require a password to access your desktops. Password: Warning: password truncated to the length of 8. Verify: Would you like to enter a view-only password (y/n)? n xauth: file /root/.Xauthority does not exist New 'X' desktop is kali:1 Creating default startup script /root/.vnc/xstartup Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/kali:1.log root@kali:~# Kill vncserver root@kali:~# vncserver -kill :1 Killing Xtightvnc process ID 16102 root@kali:~#