How to Install Ansible with pipenv and pyenv

Ansible is a powerful IT automation engine, perfect for the IT professional or DevOps engineer. There are many ways to install Ansible, often packages are used to install a single version of Ansible across your entire system. This post will cover how to install Ansible 2.12 with pipenv and pyenv. In my environment I use “Virtual Environments”, a python feature that allows you to separate your Python projects into folders and limit the libraries and packages for that folder. This means you can have multiple Ansible projects that each run a different version of Ansible. To do this we will use a few tools to manage these virtual environments, namely “pipenv”. In the past I used plain virtual environments to install ansible, however lately I’ve found that pipenv is much easier to manage. ...

April 26, 2022

Weekly Links 11/12-11/18: Ansible, Kubernetes, and DevOps

Running a little late today, I was at a friendsgiving yesterday and we decided to go bowling in the evening.. Lots happened this past week though! Cloudflare released their SSH VPN alternative. This also discusses some of the pain points they have with using VPN. Unfortunately it relies on their “ArgoTunnel” service, which look an awful lot like a VPN.. Ansible released version 2.7.2, mostly bug fixes, some other fixes to how Ansible interacts with VMWare which I’ll probably test out. Also, Ansible Galaxy moved the community features they’ve been discussing to prod. This key lime pie protein shake is delicious, and not all terrible for you. Sorry, random. Red Hat released the RHEL 8 beta, it’ll be a pretty big release for them, I’m looking forward to trying it out! HomelabOS is a pretty slick way of spinning up some home media apps with Ansible. I really like the idea of this! I’ve been playing with Openshift more lately, this runs through how to build a docker image for a Python app. I finally deployed a small kubernetes cluster with kubespray. It was a pretty big Ansible playbook, but things seem to work fine. My run was interrupted a couple times, and it picked up right where it left off. Anyway, i’ll be checking this out next “Kuberenetes 202” More projects for Kubernetes and OpenShift, this runs through how to put Gitea on kubernetes. Gitea is a pretty slick, light GitHub alternative. Jeff Geerling did an excellent run through of “DevOps” general principals and some examples from his life and experience. Also be sure to check out my refresher post on Ansible “when” statements. All this snow means more time in the lab, enjoy the upcoming holidays!

November 19, 2018

Weekly Links 10/15-10/21: Raspberry Pi, Security and Python

Thanks for stopping by, I have some more interesting links I wanted to share: Remembering which git branch im on is always a struggle, GitPrompt is an interesting solution. Interesting overview of Haw Hamburg University migrating kubernetes and ceph into a new network. I’ve been kind of obsessed with the idea of having a Lora router or transceiver in my apartment, it’s at the top of my “i want this now!” list. Some free security courses in GitHub! I do a lot of work on Raspberry Pi’s, so when I saw that piwheels makes pulling down python packages quicker for ARM based pcs, I was very excited! Running Hashicop vault is moving up in priority on my to-do list, I came across this article on how to set one up using Raspberry Pis. Would love to run a Stratux server, it allows you keep an eye on aircraft traffic in your area. A well put together article on VT-x, KVM and QEMU. I used the Pocket podcast feature to have this one read to me. Podman is RedHat’s alternative to Docker, interesting to see the how-to coming out. Was wondering when they would do this: A TV receiver hat for the Raspberry Pi. Bro, a network security monitor, just changed their name to Zeek. I use Security Onion to monitor my home WAN connection and it utilizes Bro quite heavily. sshuttle let’s you route traffic through ssh, say you’re working on a remote host that doesn’t have outgoing internet access, this would allow you to run some updates or pull down some code. I started working on an Ansible InfluxDB role last week. I’m trying to get playbooks together that specifically do not run as root. I’ve been using systemd user services to ensure they come back up on reboots. I’l have a role for that up sometime this coming week. In general most applications do not need root access, it’s just convenient to pull down an apt package rather than setting things up manually.

October 22, 2018

Weekly Links 10/7-10/14: AnsibleFest, Molecule and Python

There are a lot of interesting happenings with Ansible this week. I’ve been watching the tweets for AnsibleFest and am pretty excited to see what they announce. Here’s a roundup of some interesting links I read through this week: Interesting post on web scraping, I was looking into a way to collect results from the upcoming elections since most state’s dont have an accesible API showing election results so you have to rely on news sites. A big list of programming courses you can take. Had some Mongo/python, but also ccna, aws, game development, and general test automation. Hot off Ansiblefest, Digital Ocean has a great tutorial on Ansible/Molecule testing. Ansible performance tweak have always been interesting for me, mitogen keeps popping up on my radar. Some general info on debugging Ansible plays, this covered some things I do on the regular while working with Ansible. So I started playing with Molecule, and looked at LXD as an alternative to Docker, it’s actually really slick and for most cases. It’s like docker, but if docker looked more like a virtual machine. More on Molecule, this post was a little more detailed and relevant to what I was doing. BeeGFS is a new filesystem to play with, I spent some time with btrfs a while back and it was a good refresher on filesystems. This post covered how to deploy BeeGFS with Ansible. Ansible started leaving more info on their community projects. A cool 10G switch that’s low on power usage from Mikrotik that I really want. I’ll be digging into Molecule/TravisCI this week and I’m looking to do another tutorial post on that. I also finalized my home Proxmox cluster and want to write about that!

October 15, 2018

Setup Ansible with Python Virtualenv

If you’re interested in learning config management, or looking to try a new tool, Ansible is a great way to start managing servers. With any new tool comes the overhead of installing and configuring it. This article explains a simple way to setup Ansible with Python virtualenv. The Ansible docs goes over a variety of ways to install Ansible ranging from apt/yum installs to compiling from source. In my own experience I’ve found that create a virtualenv is the easiest way to work with Ansible, especially when using more than one project. ...

October 6, 2018