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 Use Terraform to Create AWS Servers?

Problem scenario
You want to use Terraform to deploy EC-2 instances (VMs in AWS).  How do you do this?

Solution
These directions can work on a Linux server in your enterprise, a Linux server in Azure or a Linux server in AWS.

1.  Install Terraform.  See this link if you do not know how.

2.  Create a file like this called contint.tf with this as the content:

provider “aws” {
 

A List of Chef Books

A Practical Guide to Continuous Delivery by Eberhard Wolff         
Automation through Chef Opscode: A Hands-on Approach to Chef by Navin Sabharwal and Manak Wadhwa
Chef Essentials by John Ewart
Chef Cookbook – Third Edition by Matthias Marschall      
Chef Infrastructure Automation Cookbook – Second Edition by Matthias Marschall
Chef Server on AWS (AWS Quick Start) by AWS Whitepapers and Amazon Web Services
Configuration Management with Chef-Solo by Naveed ur Rahman
Customizing Chef: Getting the Most Out of Your Infrastructure Automation by Jon Cowie
Exploration of Chef: Fast And Easy Learning!

What Is the Equivalent of “find where the site.pp file should go on the Puppet Master”?

Problem scenario
You are managing a Puppet master server.  You want to find where the site.pp file should be.  Where do you look to determine the configuration?

Solution
The result of this command is the canonical answer:
puppet master –configprint manifest

If the above returns “No manifest”, then run this command:
sudo puppet master –configprint all | grep basemodule

One of the paths resulting from the above command could be the answer to your question. 

How Do You Troubleshoot the Puppet Error “Could not send report: SSL_connect returned=1 errno=0 state=error: certificate verify failed”?

Problem scenario
You try to connect to Puppet master from Puppet agent for the first time (to get the certificate signed).  You run this command:  puppet agent -t -d

But you get this error:  “Error: Could not send report: SSL_connect returned=1 errno=0 state=error:  certificate verify failed:”

What should you do?

Solution
Are you changing the Puppet master for the Puppet agent? 

How Do You Install Puppet Master on a Debian Linux Server in GCP?

Problem scenario
In Google Cloud Platform you have a Debian Linux server.  You want to install Puppet master on it.  What should you do?

Solution

Prerequisites
We suggest having at least 4.5 GB of memory.  This can be from RAM or a combination of RAM and swap space.  To create 4 GB of /swap/space you can see this posting as a guide,

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 and Configure SaltStack Master and SaltStack Minion?

Problem scenario
You want to install SaltStack Master and SaltStack Minion.  You want them to be configured to work together.  You have different distributions of Linux.  What should you do?

Solution in Three Parts
Overview
This solution works for any distribution of Linux (e.g., Debian distributions, including Ubuntu, RedHat derivatives, including CentOS, RHEL, and Fedora, or SUSE).  This solution is written as if your Linux servers were in AWS.