Posted on June 30, 2019, 4:26 pm, by Rhys, under
Ansible,
Linux.
I’ve been doing a lot in stuff in ansible recently where I needed to fire up, kill and relaunch a bunch of processes. I wanted to find a quick and reliable way of managing this… This is possible using a combination of the pids and wait_for modules… First get the pids of your process… – […]
Posted on April 9, 2019, 12:06 pm, by Rhys, under
Ansible.
When attempting to edit an ansible-vault file… ansible-vault edit roles/cassandra_backup/vars/test_s3_cfg.yaml The following error was received… ERROR! Unexpected Exception, this is probably a bug: from_buffer() cannot return the address of the raw string within a str or unicode or bytearray object Encountered on this version of Ubuntu… Linux xxxxxxxxx 4.15.0-43-generic #46~16.04.1-Ubuntu SMP Fri Dec 7 13:31:08 […]
In the coming weeks I’m performing some testing of a new application on a Cassandra cluster. To add a little randomness into some of the tests I thought it would be interesting to give the Cassandra service a little kick. I created a simple Ansible playbook this afternoon that does this. A simple Chaos Monkey […]
Posted on January 10, 2019, 2:51 pm, by Rhys, under
Ansible.
The ansible-doc package not only installs the command line tool but also some quite detailed Ansible documentation in rst format. It would be nice if it was browsable in a html format. Here’s how that can happen (Redhat/CentOS) First install pip and restview… sudo yum install python-pip sudo pip install restview This will allow all […]
Posted on December 24, 2018, 7:43 pm, by Rhys, under
Ansible.
Sometimes I need a list of hosts as a string when working with Ansible. Pacemaker clustering is one example. Here’s a snippet of Ansible that does this.. – name: Setup list of cluster hosts set_fact: host_list: “{{ host_list }}{{ (play_hosts.index(item) == 0) | ternary(”,’ ‘) }}{{ item }}” loop: “{{ play_hosts }}” run_once: yes This […]