How industries are solving challenges using Ansible
Get link
Facebook
X
Pinterest
Email
Other Apps
Ansible is an open-source community project sponsored by Red Hat, it's the simplest way to automate IT. Ansible is the only automation language that can be used across entire IT teams from systems and network administrators to developers and managers.
In this post, you will learn about ansible handlers. Handlers are like if and else in ansible, suppose you have a configuration file in httpd server, and you want whenever you change something in configuration file, the httpd service must restart. In this case we will use handlers. Components-: Controller node(192.168.1.7), Target node(192.168.1.8) The ansible-playbook looks like It will only run the handlers portion only when notify will be changed. Target Node- httpd is running on 8081. Playbook running when conf file is changed Playbook running second time You can view the webpage running on port 8081 Thank You for reading. I would like to thanks Vimal Daga Sir. ( https://www.linkedin.com/in/vimaldaga/ ) My Email — ayanchawlae@gmail.com My LinkedIn — https://www.linkedin.com/in/ayanchawlae/
Today we will create 2 ansible roles and then will run them combined to create a load balancer setup with 2 nodes connected to it. Lets first init the roles by ansibe galaxy After these commads t15.yml is the main file in which we have combined both the codes Lets create tasks in both the roles httpdserver -> tasks -> main.yml The main.yml file in httpdserver Similarly for loadbalancer role loadbalancer -> tasks -> main.yml The main.yml for loadbalancer The config file of haproxy looks like We can see the working of loadbalancer Thank You for reading. I would like to thanks Vimal Daga Sir. ( https://www.linkedin.com/in/vimaldaga/ ) My Email — ayanchawlae@gmail.com My LinkedIn — https://www.linkedin.com/in/ayanchawlae/
Today, We will configure reverse proxy server with ansible. In other words it is a system having load balancers and servers. We have mainly 3 parts in this architecture 1. Controller Node 2. Load Balancers 3. Servers We will update our inventory file. Here, Loadbalancer groups has all ips of load balancers and servers group has all servers ips. Lets have a look at our playbook. After running this playbook. Our Servers are started Our Load Balancers config file. ...
Comments
Post a Comment