Brew Ansible



Brew install ansible. Also known as: ansible@3. Automate deployment, configuration, and upgrading. License: GPL-3.0-or-later. /api/formula/ansible.json (JSON API) Formula. Homebrew module for ansible. GitHub Gist: instantly share code, notes, and snippets.

A special shout out goes to JJ Asghar (IBM) and his coredns-playbook as it was a perfect starting point for a basic Ansible playbook.

AnsibleAnsible

This is a follow up on my previous post, “Install Information Server 11.7.1.1”, where I wrote my first Ansible playbook to automate the installation of Information Server 11.7.1.1. Even though I had been exposed to Ansible for quite some time I had never had the need to create or run any jobs myself. I figured this was a good opportunity to get my hands dirty.

Usual disclaimer: This document is for my own purpose to refer back to but if you find it useful then please let me know.

Prereqs

Install Ansible

Install two other collections:

Writing the playbook

Brew

I’ll post the main playbook here but check out the repo below for the other required files that store variables and includes a response file for IIS.

The latest version of the playbook is available here:

The output

What did I learn?

That I should have learned Ansible a lot sooner. It was very easy to get up and running. The piece-meal nature of the playbook made it easy to comment out sections, clean up the remote machine, and run again until I got it right.

Brew Ansible Tutorial

The one tricky part was finding out how to increase the number of open files allowed on the system. The community.general.pam_limits did the heavy lifting but I did need to re-run the ulimit -n 65535 command afterwards.

Specific

Summary

I’m glad I got this done as it looks like I’ll have to spin up a few of these servers in the coming weeks.

You can install Ansible quickly in your system with Homebrew( or PIP(Package manager for Python)

Install Ansible with Homebrew

Brew Ansible Command Not Found

If you are using macOS, then you can use Homebrew.

First, ensure that you have Homebrew installed in your system. Homebrew is a package manager for Mac OS. So if you want to learn more details about it, visit my blog below.

Run the following commands in your terminal. But, just copy commands without $ sign.

Checking Ansible version

Brew Install Ansible Specific Version

Install Ansible with PIP

Brew Install Ansible

Ensure that you have Python and PIP in your system. Check the following page about Python installation.

Updating Ansible

Brew Cask Install Specific Version

Installing specific Ansible version