Menu

Day 88: A Marker in the File and a Disputed Status Code
📰

Day 88: A Marker in the File and a Disputed Status Code

DEV Community: ansible·Nnamdi Felix Ibe·about 12 hours ago
#hGhqAdRP
#devtoansible#devto#dev#file#task
Long article (2047 words) — no AI summary yet.
Reading 0:00
15s threshold

Day 88 of DevOps, Day 38 of Azure. Both tasks today put the thing that matters somewhere other than where I had recorded it.

An Ansible module that is reliably idempotent turns out to store its entire record of what it did in two comment lines inside the file it edits. And an Azure error code I had written down as the answer turns out to be one of several the same condition produces, depending on the client.

One Ansible task, one Azure task. Write a block of content into a web page on three servers, then upload a file from a VM into a private blob container. The tasks come from the KodeKloud Engineer platform.

Task 1: A block of content in a web page

The task: install httpd, start it, and write a block into /var/www/html/index.html with mode 0777 owned by apache .

- name : Using the blockinfile module. ansible.builtin.blockinfile : path : /var/www/html/index.html create : yes block : | Welcome to XfusionCorp!

This is Nautilus sample file, created using Ansible!

Please do not modify this file manually!…

Continue reading — create a free account

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