#!/usr/bin/env python3 """ Fabric 2 script for executing commands on EC2 instances, and docker containers @author Winston Nolan Installation: pip3 install fabric2 termcolor boto3 """ import os import sys import requests import json import boto3 from fabric import * from termcolor import colored as c # vars # environments environments = ['dev', 'stg', 'prd'] # user user_dir = os.environ['HOME'] ssh_config = os.environ['FABRIC_SSH_CONFIG_FILE'] ssh_config_file_path = f"{user_dir}/{ssh_config}" company = os.environ['FABRIC_COMPANY'] # log prefix = 'Info: ' # colors grey = 'grey' red = 'red' green = 'green' yellow = 'yellow' blue = 'blue' magenta = 'magenta' cyan = 'cyan' white = 'white'