How Do You Install Puppet Master on an AWS Instance of Ubuntu 16?

Updated 12/1/17

Problem scenario
You need to install open source Puppet version 5 on a server to become a Puppet Master.  You have an AWS Ubuntu Linux server.  You only have five minutes to do it.  How do you install Puppet Master immediately?

Solution
1.  Create puppetinstaller.sh in the /tmp directory.  It should have the following lines (stop before you get to step #2):

#!/bin/bash
# Written by continualintegration.com

apt-get update
apt-get -y install ntp
echo ‘
server 0.us.pool.ntp.org
server 1.us.pool.ntp.org
server 2.us.pool.ntp.org
server 3.us.pool.ntp.org’ >>

How Do You Create a Table inside a Specific Postgres Database?

Problem scenario
You want to create a table in a specific Postgres database.  You want to use a command line interface (not a GUI) for this task.  (The GUI version of these directions can be found here.)  What are the SQL commands to do this?

Solution
This assumes you have a role (a username and password) to connect to the Postgres database with permissions to create tables.

How Do You List the Tables of a Specific Postgres Database?

Problem scenario
You want to see the names of the tables of a specific Postgres database.  You know the Postgres database name.  How do you do list its tables?

Solution
This assumes you have a role (a username and password) to connect to the Postgres database.

1.  Connect to the Postgres database (e.g., either through a web front-end or the command line interface). 

How Do You Change a Firewall Rule in Google Cloud Platform?

Problem scenario
You want to create an exception to your GCP firewall to allow connectivity from a different workstation or server.  What should you do?

Solution
1.  In the upper right hand corner of the console, click the icon with three horizontal bars.  This is the “Products and Services” button.  Then go to “VPC Network” -“Firewall Rules.”

2.  Click “Create Firewall Rule.”

3. 

How Do You Install Npm and/or node.js on a AWS Instance of RHEL?

Problem scenario
Using a RHEL server in AWS, you try this command “npm -v”, and it shows that npm is not installed.  You want to use the npm utility or you want Node.js to be installed on your RedHat version 7 Linux server in AWS.  You may have tried various yum commands but received errors about dependencies.  Various other scripts fail to get npm to be a recognized command.  How do you install npm and/or Node.js without changing yum repositories and without using the wget command?

How Do You Find You out the AWS Instance ID from inside the OS of a Server?

Problem scenario
You are using AWS via web browser while using multiple Putty sessions are you logged into several AWS servers (aka AWS instances).  You can find the host names and internal IP addresses of the servers when you are logged into via the command line of the OS itself.  From the AWS console you can find external IP addresses and external FQDNs.  You do not know how to correlate these instances (as the information readily available in Putty at the OS level is independent of the information available via the AWS console).

How Do You Fix the Ansible Problem “Failed to connect to the host via ssh: percent_expand: unknown key %C\r\n”, “unreachable”: true”?

Problem scenario 
When you run an Ansible playbook on the control node that is not running on a Mac (e.g., you are running Ansible on RedHat, Ubuntu or SUSE), you get this error: “Failed to connect to the host via ssh: percent_expand: unknown key %C\r\n”, “unreachable”: true”.   How do you debug your playbook to get it to run?

Root cause
​The problem may not be in the playbook.  

How Do You View Files on a Flash Drive with Your Android Phone or Tablet Computer?

Problem scenario
You attached a USB stick to your Android tablet with a cable like this (male micro USB plug to female USB port).  The USB drive has files on it that you want to view.  How do you view these files?

Solution
1.  In Android, go to Settings -Storage -Mount USB Storage.

2.

How Do You Install Sikulix on a Windows Server?

Problem scenario
You want to leverage the power of image recognition and automation without an expensive license for software that has no API exposed.  In other words you want a free version of Robotic Process Automation software on your Windows server.   What do you do?

Solution
Prerequisites
Install Java version 8.  If you do not know how, see this posting

In Windows How Do You Search the Contents of Files in a Folder and Recursively the Files in the Folder’s Subdirectories for a Specific Pattern?

Problem scenario
You want to find an .html, .txt, or .rtf file that has the pattern “cool” in it.  You do not need to search for .doc or .docx files. How do you write a PowerShell command to search the contents of files and subdirectories of a given folder to see if they have a text string that matches the word “cool”?

Solution
Run these two commands:

cd c:\to\the\folder\you\want\

Get-ChildItem -recurse | Select-String -pattern “cool”