Streamline Your DevOps Workflow: Leveraging Rundeck in Docker with Ansible

In today’s fast-paced digital landscape, effective orchestration and automation of IT operations are paramount for maintaining efficiency and scalability. DevOps teams constantly seek innovative solutions to streamline their workflows and enhance collaboration. This blog post explores the combination of Rundeck, a powerful job scheduler, and Docker, a lightweight containerization platform, with the added prowess of Ansible for configuration management.

By integrating these tools, teams can achieve a seamless and efficient orchestration pipeline. Let’s delve into how we can harness the power of Rundeck in Docker with Ansible.

Continue reading “Streamline Your DevOps Workflow: Leveraging Rundeck in Docker with Ansible”

Let’s use a more flexible directory structure for an Ansible project

Ansible is an open-source automation tool that allows you to automate IT tasks such as configuration management, application deployment, and orchestration. Ansible uses a simple YAML syntax called playbooks to define automation tasks.

With tweaking our project directory a bit we can achieve a very flexible and comfortable structure.

Continue reading “Let’s use a more flexible directory structure for an Ansible project”

Installing VirtualBox Guest Additions on a Debian Bullseye VM with an Ansible playbook

VirtualBox is a general-purpose full virtualizaton for x86 hardware, targeted at server, desktop and embedded use. The VirtualBox Guest Additions are extra pieces of software that enable better performance and functionality in virtual machines.

We install Guest Additions inside the virtual machine to activate this functionality. In VirtualBox, we can install Guest Additions by selecting Devices > Insert Guest Additions CD Image on the toolbar at the top of our guest OS window. This mounts a virtual disc to the VM. When we do this, our guest OS will respond as if we’ve just inserted a physical disc.

Here’s my example playbook that we can use to install Virtualbox Guest Additions on Debian Bullseye after installing the OS.

Continue reading “Installing VirtualBox Guest Additions on a Debian Bullseye VM with an Ansible playbook”

Configuring the network interface on a Debian Bullseye VM with an Ansible playbook

Configuring the network interfaces of Linux machines can be tedious and unpredictable if we do it by hand. Let’s automatize the procedure and minimize the possible mistakes with using Ansible! This example uses Debian, but it can be easily ported to any platform.

Here’s my example playbook that can be used to configure network for static IP address on Debian Bullseye after the OS installation.

Continue reading “Configuring the network interface on a Debian Bullseye VM with an Ansible playbook”

Installing Docker Engine on Debian Bullseye as an Ansible playbook

Docker Engine is an open source containerization technology for building and containerizing our applications. Docker Engine acts as a client-server application with a server with a long-running daemon process dockerd and APIs which specify interfaces that programs can use to talk to and instruct the Docker daemon. Docker Engine is available on a variety of Linux platforms, macOS and Windows 10 through Docker Desktop, and as a static binary installation. Docker Engine is the industry’s de facto container runtime that runs on various Linux (CentOS, Debian, Fedora, Oracle Linux, RHEL, and Ubuntu) and Windows Server operating systems.

Here’s an example playbook that we can use to install Docker Engine on Debian Bullseye after the base OS installation.

Continue reading “Installing Docker Engine on Debian Bullseye as an Ansible playbook”

How to install Hashicorp Vault on Debian

Hashicorp Vault is a popular tool for managing secrets and encryption in cloud environments. It allows us to store, access, and distribute sensitive data securely across different applications and platforms. In this blog post, I will show us how to install Hashicorp Vault on Debian 11 (Bullseye), the latest stable release of the Debian operating system.

Continue reading “How to install Hashicorp Vault on Debian”

Using Ansible Galaxy for managing Ansible roles and collections

Ansible Galaxy is a hub for finding and sharing Ansible content, such as roles and collections. Roles are pre-packaged units of work that can be referenced in Ansible playbooks and immediately put to work. Collections are larger units that can contain multiple roles, modules, plugins, and other Ansible components.

Continue reading “Using Ansible Galaxy for managing Ansible roles and collections”

Handling sensitive data with Ansible Vault: encrypting strings instead of files

Sometimes we may want to encrypt only a single variable value or a short piece of text that we need to use in our playbook or role. For example, we may want to encrypt a user password or an API key, and not an entire file. Encrypting single variables is also a good idea when we keep our files in Source Control Management like Git.

Ansible Vault has a function to encrypt only parts of files, to encrypt variables instead of the whole file.

Continue reading “Handling sensitive data with Ansible Vault: encrypting strings instead of files”

Configuration file blueprints: Jinja2 templates in the Ansible code

Templating is a huge work power in Ansible when we want to write reusable code. Just imagine about having to create different playbooks and roles for every host that have a slightly different configuration from each other. That would be nonsense. Luckily we have configuration file templates in Ansible to make our life easier, and Infrastructure as Code less complex. We have already used Jinja2 templates in our playbook when we included variables. Let’s investigate what else can we do!

Continue reading “Configuration file blueprints: Jinja2 templates in the Ansible code”

How to write more advanced Ansible inventory files?

Previously we took a look at creating a basic plain text file inventory for our Ansible automation project, but we will need more functionality when we start using it seriously. Luckily Ansible provides us some other ways to create groups of hosts and handle them. Let’s investigate what else can we do in an Ansible inventory!

Continue reading “How to write more advanced Ansible inventory files?”