Next, we need to create an inventory file to add client servers. $ sudo apt-get update -y & sudo apt-get install ansible -y Once we have repository enabled, we can now install ansible server using apt-get, $ sudo apt-add-repository ppa:ansible/ansible Install the repo with the following command, To get the latest ansible version, we need to enable the ansible repo first. $ ssh let's move on to the installation part. Now before we move on to install ansible on Ubuntu, make sure that we are able to ssh to the client without any password, Similarly, copy the file to all the client machines. $ ssh-copy-id -i ~/.ssh/id_rsa.pub 10.10.1.100 is the IP address of your client machine. So there are two ways, you can either copy the file using SCP command or you can execute the following command from the server, Two files will be created with the above-mentioned command i.e. The process to do so is as follows,įirstly create an SSH keypair on Ansible server using the following command, We can add as many as the client needed.Ģ- Password-less SSH should be enabled between the ansible server and client. Pre-requisitesīefore we move onto install Ansible on Ubuntu, let’s discuss the pre-requisites for Ansibleġ- We need at least two machines, one will act as an Ansible server & other as a client. In this tutorial, we will learn to install Ansible on Ubuntu machines. Recommended Read: Ansible Tutorial: Introduction to simple Ansible commandsĪlso Read: Top 4 Automation & Configuration management tools It uses YAML, which is easy to learn & does not require you to learn a complicated programming language like Ruby (used in puppet & chef).Īlso, it does not require any special agent to be installed on client machines & only requires client machines to have python and ssh installed, both of these are usually available on systems. Due to ease in using Ansible is one of the easiest & most popular automation tools. Ansible is an open source configuration management, application deployment as well software provisioning tool that is used to deploy, configure & manage servers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |