Urgent.News

What's breaking now, across thousands of outlets.

Tech

Getting into the world of Ansible

Getting into the world of Ansible Ever since I started exploring DevOps, I’ve always loved the idea of automating server setups with a single script. I have a strong interest for scaling web services to handle high traffic while ensuring stable uptime. For a long time, the closest tool I've been aware of was Ansible. However, it always had a steep learning curve for me, and I didn't have much…

Title: Getting into the world of Ansible

Ansible, a powerful automation tool, has long been my go-to solution for managing server setups. Its ability to scale web services and maintain stable uptime has always appealed to me. However, the tool's steep learning curve and prohibitive costs for additional servers discouraged me from exploring its full potential. Recently, advancements in AI tools have lowered the barrier to entry for Ansible, making it more accessible for experimentation.

After deciding to migrate my current apps and manage them with Ansible, I began by asking an AI tool to outline the essential concepts I needed to understand. Key topics included tasks, playbooks, vaults, variables, and inventories. While roles proved beneficial for managing complexity, I initially opted for a flat structure, similar to C projects, to keep things simple.

Modules, another crucial aspect of Ansible, initially overwhelmed me with their vast number. However, most of what I needed was within the ansible.builtin namespace, reducing the need for third-party modules. I decided to migrate Uptime Kuma, a simple app in my stack, as the test subject for my Ansible migration.

To set up the project, I needed a master node (my primary PC), SSH access to all servers, and a Tailscale connection for secure routing. I created an inventory.yml file listing my servers, an ansible.cfg configuration file, and a main playbook (site.yml) to run tasks. My first task, ping.yml, verified connectivity to the servers. The home_nodes.yml playbook managed the home infrastructure apps.

I then migrated Uptime Kuma, leveraging my previous use of Podman Quadlets for declarative deployments. The migration plan involved copying Quadlet files, creating application directories, performing a dry-run, reloading systemd, and starting or restarting the application service. This approach allowed me to manage Uptime Kuma's state without causing data loss or disrupting its operation.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Getting the Function Keys Back on a Realme Book i5

A few years ago, I bought a Realme Book i5 for work. I bought it because it was slim, the display was nice, and it was a great lightweight machine to work on away from my desk.

  • F1-F12 keys defaulted to media keys on Realme Book i5
  • FNSP=0, FNRV=1, MFNM=0 activated standard F-key mode
  • Custom device modified EC fields during boot for F-key functionality

Hello, world!

Finally! My personal blog pings the world of the internet with a hearty "Hello, world!" It honestly took me a while to buckle down and do it, but after a bunch of pins on Pinterest and checking out…

  • Author created personal blog with "Hello, world!" message
  • Chose NuxtJS and VueJS for frontend development
  • Deployed site on Digital Ocean VPS with Cloudflare security

Installing and setting up Postgres in Ubuntu

At work, we handle a lot of short-term projects, typically lasting 3-8 weeks. These projects don't require a complex deployment setup.

  • Install PostgreSQL and contrib modules using sudo apt install postgres postgresql-contrib.
  • Create a new user with sudo su postgres and run createuser interactively.
  • Grant necessary permissions with GRANT commands after setting the user's password.

More from Sunday 27 September →