Below you will find pages that utilize the taxonomy term “ansible”
Posts
Ansible Naming Conventions
Purpose Of Having Naming Conventions For An Ansible Project Consistency: Adopting a naming convention standardizes naming across the project and organization. This makes it easier for developers to switch between projects. Typically, an organization with an infrastructure team will have several Ansible projects and source code repositories. A developer working on one such Ansible project can seamlessly switch to another given a standard naming convention. Error Reduction: With improper naming there can be pitfalls.
read morePosts
The Ansible Learning Path
Ansible Prerequisites Before jumping on to learning Ansible, have a firm grounding in Linux system administration and shell scripting. You can use Ansible for a lot of automation projects. The primary target audience for this blog post are DevOps engineers, IT infrastructure engineers and system administrators who create and manage IT infrastructure to run workloads. A good understanding of YAML is required before starting to write Ansible playbooks. A background in at least one programming language helps.
read morePosts
Sysctl
Introduction The Linux Kernel parameters are settings that can be configured to control the behavior of the Linux kernel. They are typically used to fine-tune system performance or to enable/disable certain features.
Some examples of kernel parameters include:
Memory-related parameters: These parameters control how the kernel manages system memory, including how much memory is allocated to user processes and how aggressively the kernel caches data.
Processor-related parameters: These parameters control how the kernel interacts with the system’s processors, including how it schedules processes and how it handles interrupts.
read morePosts
Jenkins And Ansible: A Get Together
If you are wondering how to automate the installation and configuration of Jenkins using code, this post is for you.
Jenkins is a popular open source tool to build CI/CD pipelines.
Ansible is a popular open source tool to automate a lot of things in IT, including CI/CD and infrastructure orchestration.
Ansible can be used to deploy applications in the cloud. Ansible is a nice tool to execute steps such as:
read morePosts
Should You Maintain A Private Fork Of Open Source Terraform Modules?
This is a blog post in IAC with Terraform series.
IAC stands for Infrastructure As Code. Modern IT infrastructure can be orchestrated using programmatic methods. Terraform is(was?) a popular open source software used to orchestrate infrastructure in the cloud and elsewhere too.
Terraform has the concept of modules. With modules, you can code abstract infrastructure. For example, if you are creating a pattern of infrastructure over and over again, you could abstract the pattern into a Terraform module.
read morePosts
Run Your Own OpenVPN Server
Introduction The article explains how to run your own OpenVPN server. We will create a Certificate Authority Server and an OpenVPN server. We will also generate certificates for the clients. We will also learn how to manage revocation of client certificates using the Ansible roles.
Use the Ansible roles gavika.openvpn and gavika.easy_rsa to install and configure your OpenVPN server.
You can install the OpenVPN server on any public cloud or hosting provider or on-premise servers.
read morePosts
Creating Administrative Linux User Accounts: gavika.administrators
We are pleased to announce gavika.administrators.
The Ansible role provides a declarative method to create Linux user accounts with administrative privileges. In other words, these users have sudo access without password and are empowered to run all commands on the system.
You might be wondering why you would need a role when you can write a couple tasks yourselves in an Ansible playbook. The reason is, Do Not Repeat Yourself(DRY). Instead of writing such tasks over and over, use the abstraction provided by the role.
read morePosts
How To Determine Your Public IP Address Programmatically From An Ansible Task
Short answer: use ipify
ipify provides a simple public address API.
Using the tool, you can determine your public IP address programmatically. If you are using the shell:
curl 'https://api.ipify.org' Using it in a shell script:
my_ip=$(curl 'https://api.ipify.org' -s) echo $my_ip Using the Ansible ipify module:
- hosts: localhost vars: tasks: - name: Get my public IP ipify_facts: timeout: 20 delegate_to: localhost register: public_ip - name: output debug: msg="{{ ipify_public_ip }}" Sample output of Ansible playbook execution:
read morePosts
Gavika Ansible Roles
Yesterday, we announced the launch of Ansible role to install and configure AWS CloudWatch Agent.
You might have seen my other open source Ansible roles on Ansible Galaxy and Github.
In the same spirit, the company, Gavika Information Technologies Pvt. Ltd. Bangalore, has started publishing open source projects on Github.
Ansible role to install and configure AWS CloudWatch Agent is the first project. Expect more projects in the future.
These are some guidelines for the Ansible role projects that Gavika follows:
read morePosts
Installing AWS CloudWatchAgent On EC2 Instance Via Ansible
Install the Ansible role gavika.aws_cloudwatchagent via Galaxy ansible-galaxy install gavika.aws_cloudwatchagent Create The Playbook File - cw-play.yml : --- - hosts: all become: true vars: roles: - role: gavika.aws_cloudwatchagent Prepare the AWS CloudWatch Agent configuration In your variables file, use aws_cloudwatch_agent_config
agent: metrics_collection_interval: 60 run_as_user: "cwagent" metrics: namespace: "Gavika" append_dimensions: InstanceId: "${aws:InstanceId}" metrics_collected: disk: measurement: - used_percent metrics_collection_interval: 60 resources: - "*" mem: measurement: - mem_used_percent metrics_collection_interval: 60 In this example, I am using the namespace, Gavika.
read morePosts
Simple Password Vault With Ansible
Ansible comes with a vault feature. It is meant to be used in the context of configuration management. But you can also use it as a standalone simple password vault for your personal or organization’s use.
Initial setup of password vault:
Create or clone a Git or another SCM repository git init Create the password vault ansible-vault create myvault.secret Type the new master password and confirm, ansible-vault will open your text editor.
read more