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

Linux command: Check Current Shell

What is your current shell ?

Java: Free Online Courses

The Java™ Tutorials by Oracle The Java Tutorials are practical guides for programmers who want to use the Java programming language to create applications. They include hundreds of complete, working examples, and dozens of lessons. Groups of related lessons are organized into "trails". https://docs.oracle.com/javase/tutorial/ Learn to Program in Java at edX.ogr Get started on the path to becoming a software engineer by learning core coding skills in Java—one of the most popular programming languages. https://www.edx.org/course/learn-to-program-in-java-0 Java Tutorial by javapoint.com https://www.javatpoint.com/java-tutorial Java Tutorial by SoloLearn.com I love SoloLearn because I can learn Java - and other popular programming languages - anywhere, any time on your mobile devices. https://www.sololearn.com/Course/Java/ Java on Azure https://docs.microsoft.com/en-us/learn/paths/java-on-azure/

Powershell: Get-ChildItem

List, search/find files and directories with Get-ChildItem cmdlet.