Configure new servers with the basics via Ansible

The Problem: You have a throw away server that you only need for the next couple of hours to try something out. You need the server configured so that you can login and get to work without messing with yum updates or adding your user and public ssh keys to access it. The solution: This Ansible playbook that is simple and to the point. It updates yum or apt, applies a sane sshd config, adds users and groups and then gets your public ssh key onto the throwaway box so you can login without a password.

MacBook Setup Using Ansible and Homebrew

The Problem: You have a brand new fresh install of OSX on your MacBook and you need to get up and running. You want all your apps installed using Homebrew & Cask and OSX setup with goodies like zsh and .dotfiles. The solution: Use Ansible to deploy CLI apps via Homebrew and GUI Apps via Cask. Then have Ansible setup the shell with zsh and .dotfiles that are pulled from a GitHub repo.

Ansible on HP-UX 11.31

The problem Old corporations that are running ancient OS’es desperately need configuration management and automation to keep the dinosaurs efficient. The goal Install Python on HP-UX so Ansible can manage and automate the ancient servers. HowTo sandor@theargo> ansible -i hosts all -m raw -a "swinstall -x mount_all_filesystems=false -s depotserver:/depot/11.31/python python"

Run Ansible through pmksh

The problem Old corporations use shitty old software to do things that modern Linux is really good at doing itself. Using pmksh instead of a well laid out sudoers setup is what the problem is. The goal Configure Ansible playbooks to execute through the pmksh shell on the targeted servers. Shells & Ansible Currently Ansible & Python work together to take the output from bash and report back with formatting.

Using Ansible to Align Passwords on Servers

The Problem: A group of servers get their passwords updated every 3 months with a new shared password. The servers passwords are then inconsistently updated leaving a group of servers with one of several possible user passwords. The Goal: Use Ansible to attempt to login to each server using each of the possible passwords to find the correct one and log it. The final step of the playbook will have Ansible logging into each server using the found to be correct password and updating each server to a new shared password.

Installing Ansible

The Problem Need to deploy an Ansible Controller to run Playbooks from that uses the latest build and is easy to upgrade/configure. The Solution Install Ansible from the latest release on GitHub. The Goal Create an Ansible Controller directory that will run the latest version via git clone and setup the shell with the Ansible environment scripts. Clone the Ansible repo Go to the GitHub project page github/ansible Choose a release version or the dev branch and clone.

Using Ansible to deploy a PuppetMaster

The Problem Need to deploy a new Puppet Enterprise cluster with a PuppetMaster, PuppetConsole and a PuppetDB while avoiding typos and misconfigurations. Also need to deploy to several environments using a consistent configuration. The Solution Use Ansible to deploy Puppet onto freshly built servers that contain just a SysAdmins SSH public key. The Goal A repeatable and documented way to deploy the very finicky Puppet installer in any environment needed from local vagrants to the clouds of vSphere, AWS, RackSpace or Digital Ocean.

Using GoAccess to parse webserver logs

The Problem Need the ability to track web traffic for a specific hours worth of logs. The Solution Using GoAccess to parse Apache logs that are rotated into hour chunks. The Goal Install GoAccess to parse webserver logs. Use Ansible Playbooks for the installation, configuration and for re-usabilty of GoAccess on other servers. Keep it simple by rotating logs on the hour. The Links GoAccess - real-time web log analyzer - allinurl/goaccess Ansible - Ansible Docs Apache rotatelogs - Hourly Rotated WebServer Logs Digital Ocean - My referral link, thanks!

Ansible on RedHat 5.x

The problem Older Pythons that live on older RedHats do not have json support. Old corporations still use old OS’es like RedHat 5.x but need to use modern configuration management tools like Ansible. The goal Enable RedHat 5.x systems to run Ansible by installing json support on Python 2.4. HowTo Using Ansible Raw sandor@theargo> ansible -i hosts all -m raw -a "yum -y install python-simplejson"