- Install the application sshpass:
sudo apt install sshpass
- Make sure to set in your
~/.ssh/config
file the following options to prevent ssh from using your pubkey:
terraform { | |
backend "s3" { | |
bucket = "elliott-arnold-dev-bucket" | |
region = "us-east-1" | |
key= "tfstate" | |
} | |
} |
terraform { | |
required_version = ">=0.12, <0.13" | |
} |
""" | |
This module provides functionality for making HTTP requests. It leverages the `aiohttp` | |
library for asynchronous HTTP requests, and the `backoff` library to implement exponential | |
backoff in case of failed requests. | |
The module defines a child logger for logging purposes and implements two methods, `on_backoff` | |
and `on_giveup`, which log information about the retry attempts and when the retry attempts are | |
given up respectively. | |
The `http_request` function is the primary function of the module, making an HTTP request with the |
import boto3 | |
# Specify the region where the EC2 instances reside | |
region = 'us-east-1' | |
# Specify the tag key and value to filter the EC2 instances | |
tag_key = 'env' | |
tag_value = 'prod' | |
# ref: https://coderwall.com/p/ez1x2w/send-mail-like-a-boss | |
# install mailx | |
yum -y install mailx | |
# create a directory with a certificate, to send mail using TLS | |
mkdir ~/.certs | |
certutil -N -d ~/.cert | |
# create a user ~/.mailrc, to use custom settings |