This configuration will allow you to deploy resources many times in a row with no "stateful" behavior.
terraform apply
import unittest | |
from selenium import webdriver | |
from selenium.common.exceptions import NoSuchElementException | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support import expected_conditions as EC | |
class TestTemplate(unittest.TestCase): | |
"""Include test cases on a given url""" |
# SOURCE: Replace "infrastructure-namespace-with-secret" with the name of the namespace with yor source secret | |
# DEST: Replace "your-new-namespace" with the name of the namespace you want to copy to. | |
--- | |
# First role is created in the namespace with your master secret. This role allows you to "get" a "secret" named "letsencrypt-prod" in that namespace | |
kind: Role | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
namespace: infrastructure-namespace-with-secret | |
name: role-read-secret | |
rules: |
ansible_host: prod-vpn.yourfqdn.com # How Ansible will reach the Linux server for configuration | |
ansible_user: ubuntu # Which Linux user will Ansible use? | |
server_fqdn: "{{ ansible_host }}" # How your clients connect to the VPN server |
version: '2.4' | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:7.1.1 | |
volumes: | |
- es-data:/usr/share/elasticsearch/data | |
environment: | |
- discovery.type=single-node | |
- cluster.name=docker-cluster | |
- "ES_JAVA_OPTS=-Xms2G -Xmx2G" |
1561572401,horse-uat,Ubuntu,16,16.04,xenial | |
1561572405,moose-uat,Ubuntu,16,16.04,xenial | |
1561572408,duck-uat,Ubuntu,16,16.04,xenial | |
1561572413,goat-uat,Ubuntu,16,16.04,xenial | |
1561572415,horse-dev,Ubuntu,16,16.04,xenial | |
1561571759,moose-dev,Amazon,2016,NA,NA | |
1561572422,duck-dev,Ubuntu,16,16.04,xenial | |
1561572426,goat-dev,Ubuntu,14,14.04,trusty |
svc := ec2.New(getSessionForRegion(region)) | |
input := &ec2.DescribeImagesInput{ | |
Filters: []*ec2.Filter{ | |
{ | |
Name: aws.String("image-id"), | |
Values: []*string{aws.String(ami)}, | |
}, | |
}, | |
} |
func getSessionForRegion(region string) *session.Session { | |
return session.Must(session.NewSessionWithOptions(session.Options{ | |
SharedConfigState: session.SharedConfigEnable, | |
Config: aws.Config{Region: aws.String(region)}, | |
})) | |
} |
// defer rows.Close() | |
// colNames, err := rows.Columns() | |
// if err != nil { | |
// log.Fatal(err) | |
// } | |
// cols := make([]interface{}, len(colNames)) | |
// colPtrs := make([]interface{}, len(colNames)) | |
// for i := 0; i < len(colNames); i++ { | |
// colPtrs[i] = &cols[i] |
#!/bin/python | |
""" | |
python report.py | sendmail user@domain.com | |
""" | |
import yum, platform | |
import os | |
from collections import namedtuple | |
DiskUsage = namedtuple('DiskUsage', 'total used free') |