Home Projects Portfolio Dashboard Export PDF Log in
Shell Ansible

Automating Systems Configuration: Insights from the UTN-FRA Operating Systems Project

In system administration, the leap from manual configuration to repeatable automation is a rite of passage. While working on the UTN-FRA_SO_2do_Parcial project, I focused on standardizing infrastructure deployments using Ansible to ensure consistency across environments.

The Challenge of Manual Setup

When managing operating system environments, manual configuration is often the first step in understanding the underlying requirements. However, it quickly becomes a bottleneck. Performing the same task repeatedly—whether configuring network interfaces or applying security policies—is prone to human error and difficult to audit.

Moving Toward Automation

Transitioning these tasks into Ansible playbooks allows us to define the desired state of the system as code. By focusing on the 'Punto D' requirement of the project, I explored how to encapsulate system-level configurations into modular Shell scripts that can be orchestrated via Ansible.

Practical Implementation

To bridge the gap between configuration and automation, we can structure our tasks to be idempotent. This ensures that running the script multiple times doesn't result in unintended side effects. Below is an example of how one might automate a service configuration task using a Shell script wrapper:

#!/bin/bash
# Standardize system configuration
SERVICE_NAME="example_service"

if systemctl is-active --quiet "$SERVICE_NAME"; then
  echo "Service $SERVICE_NAME is already running."
else
  echo "Configuring and starting $SERVICE_NAME..."
  systemctl start "$SERVICE_NAME"
  systemctl enable "$SERVICE_NAME"
fi

This script checks if a service is active before attempting to modify its state. By integrating these checks into your automation flow, you create a more resilient environment where configuration is predictable.

The Takeaway

Automation is not just about saving keystrokes; it is about creating a reliable source of truth for your infrastructure. Start by identifying one repetitive manual task you perform and convert it into a idempotent script or Ansible task. You will find that documenting your process through automation leads to a deeper understanding of your system's architecture.


Generated with Gitvlg.com

Automating Systems Configuration: Insights from the UTN-FRA Operating Systems Project
Carola Castanheira Becq

Carola Castanheira Becq

Author

Share: