Menu

Post image 1
Post image 2
1 / 2
0

5.Ansible Blockinfile Module

DEV Community: ansible·Thu Kha Kyawe·3 days ago
#GxuWHla3
#dev#html#ansible#fullscreen#apache#article
Reading 0:00
15s threshold

Lab Information The Nautilus DevOps team wants to install and set up a simple httpd web server on all app servers in Stratos DC. Additionally, they want to deploy a sample web page for now using Ansible only. Therefore, write the required playbook to complete this task. Find more details about the task below. We already have an inventory file under /home/thor/ansible directory on jump host. Create a playbook.yml under /home/thor/ansible directory on jump host itself. Using the playbook, install httpd web server on all app servers. Additionally, make sure its service should up and running. Using blockinfile Ansible module add some content in /var/www/html/index.html file. Below is the content: Welcome to XfusionCorp! This is Nautilus sample file, created using Ansible! Please do not modify this file manually! The /var/www/html/index.html file's user and group owner should be apache on all app servers. The /var/www/html/index.html file's permissions should be 0777 on all app servers.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More