What Do You Do when an Ansible Playbook is Not Getting a Variable Assigned Properly?

Problem scenario
Ansible variables are not being picked up when the playbook runs. You may get no errors, or you may get errors like these:

“ERROR! Syntax Error while loading YAML…did not find expected key”

“ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path”

What should you do?

Possible Solution #1
Are you using the -i flag when you are running the command to execute the playbook?

What Should You Do to Set Firefox to Be Your Default Browser in Windows 10?

Problem scenario
When you open Firefox in Windows 10 you get a prompt about whether or not it should be your default browser. You choose the option (“Use Firefox as my default browser”) to make it your default browser, but it does not work. You see a window called “Settings” which has options for default applications.

What should you do to get Firefox to be your default browser in Windows 10?

What is a ReplicationController in Kubernetes?

Question
What is a ReplicationController in Kubernetes?

Answer
It is a component that ensures the pods are constantly running (page 90 and 91 of Kubernetes in Action by Luksa). They were designed to create and manage redundant pods (page 91 of Kubernetes in Action by Luksa). They do just that — they do not transfer pods but create new ones on different nodes (page 93 of Kubernetes in Action by Luksa).

How Do You Use PowerShell to Find out if a Given Update Has Been Installed on Your Windows Workstation?

Problem scenario
You want to know if a particular KB was installed on your Windows machine. You know the KB number. How do you use PowerShell to find out if this update has been installed or not?

Solution
Run this: get-hotfix | sls “kb123456789” # Replace kb123456789 with the KB of your choice.

How Do You Deal with a Monitor Appearing in the Control Panel of Windows when That Monitor is Not Physically Attached to the Computer?

Problem scenario
In Windows Control Panel for Screen Resolution you see a reference to a monitor. But no monitor is physically attached. The monitor’s graphic reference is dark (not a bluish gray) in the visual depiction of the positions of the different monitors. How do you eliminate this extra monitor reference?

Do you need to reinstall a display adapter or video card if there is an extra monitor listed in the Screen Resolution of the Windows Control Panel when no such monitor is physically attached?

How Do You Create a Recovery Drive (e.g., a USB stick) for Windows 10?

Problem scenario
You want a USB stick to use in case you need a new hard drive (e.g., your hard drive crashes). How do you create a recovery USB stick?

Solution

  1. Remove all USB sticks (as a recommended practice) except a USB stick that can be overwritten. This USB drive should have 8 GB or greater capacity.
  2. In the lower left hand search box,

How Do You Test if a REST API Call Is Reaching a Linux Server?

Problem scenario
You have a Linux server with a web service listening on port 443 (or some other port). You are not sure if another server can reach this Linux server. There could be firewall issues or network problems restricting connectivity on a given port. You have used ping to test connectivity. You have used nmap to verify the port is listening. But you are not 100% sure the REST calls are reaching the intended server on the correct port (e.g.,

How Write a Custom Method inside of a Class in Groovy?

Problem scenario
You are familiar with Groovy scripts. Now you want to use a class and a method in the class. How do you do this?

Solution
Prerequisites
Install Groovy. See these directions for Ubuntu/Debian if you need assistance; see these directions for CentOS.

Procedures

  1. Create a file called test.groovy with the content below:

class Example {
def static Display(nifty) {
nifty.call(“Red”); …