Ansible, HTTPD Integration and the Idempotent Nature of Ansible

Ansible, HTTPD Integration and the Idempotent Nature of Ansible

Task Description

?? 11.3 Restarting HTTPD Service is not idempotence in nature and also consume more

resources suggest a way to rectify this challenge in Ansible playbook.


Why and when we need to restart a service?

Restarting a service is needed when there is change in the configuration file of the server. After restarting only that the new change done in the configuration is reflected.

Why is meant by the idempotence nature of Ansible?

Idempotence nature means that the when we run a playbook the tasks or services which is not present on the managed node only that part is performed and the part which is already done is ignored.

for example: If we want to install httpd software the we write a playbook and that will do the same. The intelligence of ansible will first check for the application. It will install httpd only when it is not present.

Lets talk about the restart option of service module-

Restart option of Service Module is not idempotence in nature. Which means it will keep on performing the task even if there is no any change.

To handle this we have to option of ansible playbook which when used together will make the restart option of service module idempotence.

Lets see the video for the code and more details:


Thank you!

GAURAV DESHMUKH

Former SDE Intern @Raja Software Labs, Pune

4 年

Very useful , Great work !!!

回复

要查看或添加评论,请登录

Abhishek Anand的更多文章

  • Arth Task-6

    Arth Task-6

    Task Description?? ?? Create High Availability Architecture with AWS CLI ?? ?? The architecture includes- ?? Webserver…

  • Routing Concept: Pinging google but can’t ping to Facebook.

    Routing Concept: Pinging google but can’t ping to Facebook.

    Task Description ??Create a Setup such that you can ping to Google but not to Facebook from the same system. To solve…

  • Hands on Workshop on Git and GitHub with Vimal Sir!

    Hands on Workshop on Git and GitHub with Vimal Sir!

    The two days workshop on the git and gitHub was organized by LinuxWorld Informatics Pvt. Ltd.

  • Using AWS through CLI

    Using AWS through CLI

    TASK DESCRIPTION ?? Create a key pair ?? Create a security group ?? Launch an instance using the above created key pair…

  • Netflix on AWS : Case Study

    Netflix on AWS : Case Study

    About Netflix Netflix, Inc. is an American technology and media services provider and production company headquartered…

    5 条评论

社区洞察

其他会员也浏览了