How Do You Run Ansible Playbooks on Managed Nodes That Run Shell Scripts That Require sudo?

Problem scenario
You run an Ansible playbook on a server as a remote user that is a sudoer on that same server.  But you get this error when you run the playbook: “sudo: a password is required\r\n”, “msg”: “MODULE FAILURE”, “rc”: 1}”   How do you troubleshoot this error?

You want to run Bash scripts via Ansible playbooks.  But these scripts will install packages and modify sensitive files. 

How Do You Set up Ansible for the First Time?

Problem scenario
You have Ansible installed as a control server (a centralized server to push down configurations to other servers).  You want to use it to manage another server.  How do you configure the other server to be a managed node?  In other words, how do you configure Ansible to push configuration changes down to servers?

Solution
Prerequisite
Ansible must be installed.

How Do You Install Terraform on any Type of Linux?

Problem scenario
You want to quickly install Terraform on any type of Linux.  How do you write a single script that will work on Debian/Ubuntu, CentOS/RedHat/Fedora, or Linux SUSE?

Solution
1.  Create a file called terra.sh in /tmp/ with the content below.

#!/bin/bash
# Written by www.continualintegration.com
# Updated in January of 2022

tfv=0.15.5 # Change this version as necessary

distro=$(cat /etc/*-release | grep NAME)

debflag=$(echo $distro | grep -i “ubuntu”)
if [ …

How Do You Troubleshoot the Puppet Error “[/var/lib/puppet/facts.d]: Failed to generate additional resources using ‘eval_generate’: SSL_connect returned=1”?

Problem scenario
You run puppet agent -t -d and get this error:

“Error: /File[/var/lib/puppet/facts.d]: Failed to generate additional resources using ‘eval_generate’: SSL_connect returned=1”

What do you do?

Solution
This is more of a resolution rather than a diagnosis.  The error should go away if you follow these steps.

On the Puppet agent node run these commands:

sudo cd /var/lib/puppet/ssl
sudo rm -rf *
sudo puppet agent -t -d

If you cannot find the ssl directory in the above location,

How Do You Deploy Puppet Agent to a RedHat Linux Instance in AWS?

Problem scenario
You installed Puppet Master on an AWS instance of RedHat Enterprise Linux.  (See this link if you want to install Puppet Master.) You now want another AWS instance of RHEL 7.x to be configured as a Puppet Agent node. You want to run a manifest to make sure that this new Puppet Agent node (i.e., server) is working with your Puppet Master server.  What do you do to install Puppet Agent 5.x on a RedHat Linux server and configure it to work with Puppet Master?

What is DevSecOps (or DevOpsSec, SecDevOps, or rugged DevOps)?

Updated 2/10/22

Answer
DevSecOps is the integration of security practices with DevOps.  DevOps may be a culture of automation (as Stackify says), a blend of disciplines (development and operations), or a key word in a job title (e.g., DevOps Engineer or DevOps Architect).  DevSecOps seeks to rapidly integrate security measures into development and operations and avoid security specialists working in separate and relatively isolated teams. 

How Do You Troubleshoot the Chef Error “Field ‘name” invalid” after Running a chef-server-ctl Command?

Problem scenario
You are trying to create an organization using the chef-server-ctl org-create command.  But you get an error that the “name” entered was invalid.  For example, you run this:

sudo chef-server-ctl org-create ContInt “ContinualIntegration” –association_user contintuser –filename /bin/good.pem

But you get this:

ERROR: The data in your request was invalid
Response: Field ‘name’ invalid

What should you do?

Solution
For the “shortname” that is immediately after the “org-create” command,

How Will Trends in DevOps and Automation Affect SDETs?

Question
Will current trends in DevOps and automation affect the role SDETs play?

Answer
If you want a definition of an SDET (and its etymology), see this posting. (As of 9/2/19, Wikipedia has no definition of the job title SDET.) If you Google the phrase “devops venn diagram” for images you will not see pictures of merely two overlapping circles with one circle representing “development” and another representing “operations.”  You will see DevOps in the middle of an intersection of three circles — one of the circles is also QA! 

How Do You Write a Chef Recipe to Deploy a Apache Web Server to Linux Servers?

Problem scenario
You have Linux servers that need Apache web server installed on them.  How do you write a Chef recipe to deploy Apache web server?

Solution
Prerequisite

This solution requires that the Chef server must have access to GitHub.  If you want to install Chef server, see this posting.  If you want to install Chef client, see this posting