Posts

Showing posts from January, 2021

Ansible and Industries

 Ansible and Industries Ansible  is an  open-source  software  provisioning , configuration management, and  application-deployment  tool enabling  infrastructure as code .  It runs on many  Unix-like  systems, and can configure both Unix-like systems as well as  Microsoft Windows . It includes its own  declarative language  to describe  system configuration . Ansible was written by Michael DeHaan and acquired by  Red Hat  in 2015. Ansible is  agentless , temporarily connecting remotely via  SSH  or  Windows Remote Management  (allowing remote  PowerShell  execution) to do its tasks. Architecture Unlike most configuration-management software, Ansible does not require a single controlling machine where orchestration begins.  Ansible works against multiple systems in your infrastructure by selecting portions of Ansible's inventory, stored as edit-able, version-able ...

Web Server using Ansible Playbook

Image
Configuring webserver using ansible playbook 1. Add the IP address of the target node in the folder /etc/ansible/ansible.cfg 2. Use the command 'ansible all --list-hosts' to check if the IP is added as a host. 3. Use pip install sshpass or dnf command for ssh 4 . Create the file in yml extension in the main node. And use the command 'ansible-playbook <filename.yml>' Here, I am configuring using docker and my yml file is named as docker.yml So, my command will be 'ansible-playbook docker.yml' 5. In the target node where we are configuring webserver, go to the terminal and check a docker container is launched or not usiong the command 'docker ps' 6. Type the command 'docker inspect <container_id> | grep IP' It will display all the strings with the word IP in it.  We can either use curl command along with the IP adrress and filename (or) we can use the IP_address/filename to check if the webpage is created.