How Do You Troubleshoot an Ansible Problem about Missing Quotes when You Have Quotes around Each Variable?

Problem scenario
You run an Ansible playbook but you get an error about “this one looks like it might be an issue with missing quotes.”  Your Ansible playbook compares two variables with each other.  

After running ansible-playbook on the .yaml file, you get this error:

“ERROR! Syntax Error while loading YAML.
  expected <block end>, but found ‘<scalar>’

The error appears to have been in ‘/home/cooluser/good.yaml’: line 12,

How Do You Iterate through a List of Servers When Running an Ansible Playbook?

Problem scenario
You want an Ansible playbook to run on specific managed nodes.  You can create a list of the servers you want the playbook to apply to.  How do you provide a list of specific hostnames and have the Ansible playbook run on each server?

Prerequisites
This assumes that you have installed Ansible and have it working with the managed nodes you want to run a playbook on. 

How Do You Get Variables That Are Assigned a Value in an Ansible Playbook (i.e., a .yaml file) to Be Assigned from a Different File?

Problem scenario
You have a complex Ansible playbook (a .yaml file) that you want to be more modular with discrete component files.  You want to assign variables in a different file.  This will make your Ansible playbook have fewer lines.  Your playbook must  read in the variables from a separate file and inject them into the playbook when it is run.  You appreciate Unix philosophy of having things be modular.

How Do You Leverage Ansible to Deploy Salt Minion to an Ansible Managed Node?

Problem scenario
You have two configuration management servers: one is an Ansible control server and another is a Salt Master server.  You want Ansible to deploy Salt Minion to the managed nodes.  You want the managed nodes of Ansible to receive configurations from the Salt Master server.  This way one team can use SaltStack and another team can use Ansible.  How do you do this?

Solution

Prerequisites
This assumes you have deployed Salt Master and Ansible

How Do You Get Ansible Playbooks to Create Directories on Managed Nodes?

Problem scenario
You want Ansible to create directories on managed nodes.  How do you write a playbook to do this?

Solution
Prerequisites

This assumes that you have installed and configured Ansible.  If you do not know how to deploy Ansible, see this posting if you are using a Red Hat derivative.  If you are using Linux SUSE,

How Do You Troubleshoot the Cassandra Problem about “Connection refused”?

Problem Scenario
You have installed Apache Cassandra on Linux.  It is deployed as a single node configuration (not a cluster).  When you run “cqlsh” you get this error:

“Connection error: (‘Unable to connect to any servers’, {‘127.0.0.1’: error(111, “Tried connecting to [(‘127.0.0.1’, 9042)]. Last error: Connection refused”)})”

How do you troubleshoot cqlsh when you get this message “”Tried connecting to [(‘127.0.0.1’, 9042)].

How Do You Install Apache Cassandra on Linux SUSE?

Problem scenario
You are running Linux SUSE and want to install Apache Cassandra.  How do you install Apache Cassandra on Linux SUSE?

Solution
Prerequisites
i.  This solution assumes that you have Java installed.  If you need assistance, see this link.

ii.  This solution assumes your server has a total of 2.5 GB of memory (a combination of either virtual memory or RAM). 

How Do You Install Apache Cassandra on Ubuntu 16.04?

Problem scenario
You are running Ubuntu 16.x Linux and want to install Apache Cassandra.  How do you install Apache Cassandra on Linux Ubuntu Linux as a single-server configuration?

Solution
These directions will work to deploy Debian 9 Linux too.  They have been tested to work in AWS and GCP.

Prerequisites
i.  This solution assumes that you have installed Apache Ant and Git. 

How Do You Run an Ansible Playbook to Configure 2 GB of Swap Space on Every Linux Server?

Problem scenario
You want every Linux server to have 2 GB of virtual memory.  You want to transfer a Bash script to each server and run it with sudoer privileges.  How do you transfer a file and execute it as a sudoer user?

Solution
1.  Install Ansible.  If you need directions on how to do this with RHEL, see this posting.  For SUSE,

How Do You Install Apache Cassandra on a RedHat Derivative of Linux?

Problem scenario
You want to install Apache Cassandra on CentOS, RHEL, or Fedora Linux.  What do you do?

Solution
These directions will deploy Apache Cassandra in a solo-server configuration.  This will not create a cluster.  These directions will work for a physical server, a VM, an EC-2 instance in AWS or a virtual machine in GCP.

Prerequisites

i.  This assumes that you have 3 GB of memory (in combination of either RAM or virtual memory,