DevOps

How to schedule master node running pod/service as worker node

Question: How to Schedule Master Node to Run Pod Workloads Like the Worker Node? By default, only the worker node…

Python Quadratic Formula

An equation with the form ax^2+bx+c=0 is known as a quadratic equation. When plotted on a graph it will take…

How to Check if the script is run by root at the start of the script

Check root at start of script Some scripts need to be run as root and you may want to check…

How to use ansible-config to discover and investigate configuration options

Viewing Configuration Options If you want to find out what options are available in the configuration file, use the ansible-config…

How to write multiple plays and per-play privilege escalation in Ansible

Writing Multiple Plays A playbook is a YAML file containing a list of one or more plays. Remember that a…

How to Write Ansible Playbook and run it using the ansible-playbook command

Ansible Playbooks and Ad Hoc Commands Ad hoc commands can run a single, simple task against a set of targeted…

How to Run Ad-Hoc Commands Using Ansible

In this post, we will learn how to run a single Ansible automation task using an ad hoc command and…

Unable to run NGINX Docker due to “13: Permission denied”

The Problem The NGINX docker container was started using the below command: # docker run --detach --name nginx_server nginx 4ffbcd5ee796b8cce3f2c6ed4cce8927d2b13a040af07b36f7a866b2157290e8…

How to Use user-defined Functions in awk

User-Defined Functions You can create user-defined functions in a awk script file using the func or function keywords. Placement in…

Using Loops (while, for) in awk scripts

The awk programming language contains many of the programming concepts that are used in shell scripting. Conditionals, such as the…