AlmaLinux OS Documentation
Many servers use one or more virtual machines (VMs), e.g. to isolate a public service in the best possible way and to protect the host server from compromise. This article explores the possibilities of deploying Fedora Cloud Base images as a VM in an autonomous Fedora 33 Server Edition using version 3 of virt-install. This […]
In this post, we’re going to see how we can create virtual machines in seconds, the way it’s done in modern cloud infrastructures such as EC2 and Digital Ocean. This is kind of a continuation of my previous post, where I explain the basics of virtualization and create a virtual machine in the old-school way. So let’s dive right into it!
Using Ansible makes provisioning virtual machines automated, flexible, repeatable, and fast.
It's handy to have a lab environment separate from your day-to-day workstation. Use these commands to set up a place to learn and experiment without risking your work environment.
https://docs.ansible.com/ansible/devel/getting_started_ee/index.html
Ansible role to install and configure neovim
Recommended practices for all elements of automation using Ansible, starting with collections and roles, continuing with playbooks, inventories and plug-ins... These good practices are planned to be used by all Red Hat teams interested but can of course be used by others. - automation-good-practices/README.adoc at main · redhat-cop/automation-good-practices
ansible-language-server extension for coc.nvim. Contribute to yaegassy/coc-ansible development by creating an account on GitHub.
https://ansible-semaphore.com/
https://youtube.com/playlist?list=PLVx1qovxj-al0Knm1A0eEXfGyd5kCi16p
Using SSH agent forwarding is dangerous. However, a dedicated agent can mitigate the risks.
Important for HCL Connections Automation! The global UseAgentForward needs more documentation and anrework to avoid.
Ansible is one of the most prominent tools among DevOps for managing software configuration because of its ease of use and bare minimum dependencies. The highlight of this tool is Ansible roles which provide a wholesome package of various functionalities that we need for software configuration.
As we know that ansible roles have a wide directory structure that looks something like this.
$ tree -d . ├── defaults ├── files ├── handlers ├── media ├── meta ├── molecule │ └── default │ └── tests ├── tasks └── templates 10 directories
We can read online about the significance of these directories but often there is some confusion around two of them that always bugs me, which are vars and defaults. Whenever I write a role I often think of whether to put my variables in defaults or the vars.
According to Ansible’s definition, the difference between defaults and vars is:
defaults mean “default variables for the roles” and vars mean “other variables for the role”.
The priority of the vars is higher than that of defaults.
For example, consider a variable named ‘version’ defined in the defaults have value ‘5.0.1’ and the same variable defined in vars have value ‘7.1.3’, so the final value that will be taken into account is the value defined in vars i.e., ‘7.1.3’.
Due to my limited understanding of this, I used to define all variables in defaults and whenever needed to override them, I declared those variables in vars.
But there was more to it just than precedence, which motivated me to deep dive into it and finds out that there are two types of variables in terms of content, “static” with constant value and “dynamic” with changing value. According to the ansible definition, the static variables should be placed in default and the dynamic should be placed in vars.
If you’ve used Ansible, you’re likely very familiar with this default output when a playbook runs a few tasks: the green indicates “ok” and unchanged, and the yellow indicates that a task has reported a change on the remote node.
Ansibles Callback plugins control most of the output you see when running the command line programs, but can also be used to add additional output, integrate with other tools and marshall the events to a storage backend
Ansible is a great tool for automating IT workflows, and I use it to manage hundreds of servers and cloud services on a daily basis. One of my small annoyances with Ansible, though, is it's default CLI output—whenever there's a command that fails, or a command or task that succeeds and dumps a bunch of output to the CLI, the default visible output is not very human-friendly.
How to develop Ansible roles w/ unit test and continuous integration services.
You can migrate any existing standalone role into a collection and host the collection on Galaxy. With Ansible collections, you can distribute many roles in a single cohesive unit of re-usable automation. Inside a collection, you can share custom plugins across all roles in the collection instead of duplicating them in each role’s library/` directory.
You must migrate roles to collections if you want to distribute them as certified Ansible content.
Sometimes you want a task to run only when a change is made on a machine. For example, you may want to restart a service if a task updates the configuration of that service, but not if the configuration is unchanged. Ansible uses handlers to address this use case. Handlers are tasks that only run when notified. Each handler should have a globally unique name.
This topic describes how to create Ansible roles that can be imported into Galaxy.
Collections are a distribution format for Ansible content. You can use collections to package and distribute playbooks, roles, modules, and plugins. You can publish and use collections through Ansible Galaxy.
Ansible is an open-source IT automation software that automates the IT infrastructure. It creates an automated and consistent IT environment which makes IT task much easier and faster. Such an environment is self-regulating that can manage all the IT services without using any additional agent. It set up an automated environment for server, OS, Application and other IT services and configures them for better access. It also manages the deployment of any application on the system. Ansible uses to configure a variety of IT materials such as network devices, servers, database storage, cloud infrastructure, firewall, and any other virtual/physical platform. It automates the administrator’s task and allows fast access to various IT services. Ansible uses YAML language that describes system configuration to manage the IT services.
Ansible Kubernetes Collection as example
Ansible collections as example
Ansible provides feature named handlers, which is like a task but will only run when called by a notifier in another task. This feature is important because your requirements for running a task may depend on the state of a service, existence of a file or a follow up tasks when state changed. We can make use of variables in notify and handlers which makes it more flexible. Ansible Handlers are used extensively in production and live environments as you always depend on something else to decide whether a task should run or not.
Git-hook to prevent commit when the Vault is unencrypted
is an open source software that automates software provisioning, configuration management, and application deployment. Ansible is written in Python and uses YAML for playbook language, both of which…
Ansible introduction