Posts Tagged ‘Ansible’

Setting up a Ansible Module Test Environment

I’ve begun developing some Ansible modules and have created a Vagrant environment to help with testing. You can check it over over on my github. The environment has been created to test some MongoDB modules but can easily be repurposed to another use. It’s quite simple to get started; ?View Code BASHgit clone https://github.com/rhysmeister/AnsibleTest.git cd AnsibleTest […]

Staged service restart with Ansible

I’ve been working on a small project to create a Cassandra Cluster for Development purposes. I’m using Vagrant and Ansible to deploy a 5-node Cassandra Cluster and node #5 would always fail to join the cluster. I checked /var/log/cassandra/cassandra.log and this is what I found; INFO [InternalResponseStage:1] 2017-09-09 18:49:07,673 ColumnFamilyStore.java:406 – Initializing system_auth.roles INFO [main] […]

MySQL 5.7: root password is not in mysqld.log

I came across this issue today when working on an ansible playbook with MySQL 5.7. Old habits die hard and I was still trying to use mysql_install_db to initialise my instance. It seems a few others have been doing the same. The effect of using mysql_install_db in more recent version of MySQL is that we end […]

A Cassandra Cluster using Vagrant and Ansible

I’ve started a new project to create a Cassandra Cluster for development purposes. It’s available on my github and uses Vagrant, Ansible, and VirtualBox. Assuming everything is installed it’s quite easy to get started; ?View Code BASHgit clone https://github.com/rhysmeister/CassandraCluster.git cd CassandraCluster vagrant up Check the status of the machines; ?View Code BASHvagrant status; Current machine […]

Check MariaDB replication status inside Ansible

I needed a method to check replication status inside Ansible. The method I came up with uses the shell module… ?View Code YAML— – hosts: mariadb vars_prompt: – name: "mariadb_user" prompt: "Enter MariaDB user" – name: "mariadb_password" prompt: "Enter MariaDB user password"   tasks: – name: "Check MariaDB replication state" shell: "test 2 -eq $(mysql […]