In this we are going to Configure a webserver on a Managed Node, through Ansible with the feature of Dynamic Updates.
- Setting up httpd webserver over Managed Node.
- Adding configuration files
- Handling the service, to be started only when there are some changes in the configurations.
Step 1: First of all configure the inventory file.
Step 2: Configure the ansible configuration file
Step 3: Creating the ansible playbook.
Step 4: Create a configuration file for the configuring webserver
There can be any port number as well as any Document root.
Step 5: Check the connectivity to the Managed Node.
Command: “ansible -m ping all”
Step 6: Executing the playbook
Command: “ansible-playbook service.yml”
Step 7: Checking that the Managed node is configured properly or not?
Step 8: Try to execute the playbook again.
As we are not making any changes in the conf file, so it won’t restart the service!!!
Just like this we can have multiple use cases of Ansible.
💫Keep Learning, Keep Sharing💫