This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
connection: local | |
- tasks: | |
- name: Creates directory | |
file: path=/test state=directory | |
- name: Download ZIP to server | |
command: wget <<artifectusrlor any zip path>> -O /test | |
- name: copyinng a file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
AWS_ACCOUNT_ID="xxxxxxxxxxxxxx" | |
aws configure set default.region us-east-1 | |
# Login AWS Docker registry | |
eval $(aws ecr get-login --no-include-email) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /usr/bin/python2.7 | |
import boto.ec2 | |
import sys | |
# specify AWS keys | |
auth = {"aws_access_key_id": "<key_id>", "aws_secret_access_key": "<access_key>"} | |
def main(): | |
# read arguments from the command line and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "aws" { | |
access_key = "xxxxxxxxxxxxxxx" | |
secret_key = "yyyyyyyyyyyyyyyyyyyyy" | |
region = "us-west-2" | |
} | |
resource "aws_iam_role" "test_role" { | |
name = "TenableIO" | |
assume_role_policy = <<EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "PublicReadForGetBucketObjets", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity ${origin_access_identity}" | |
}, | |
"Action": ["s3:GetObject"], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "name" { default = "us-west-2-cloudfront-resource-demo" } | |
variable "region" { default = "us-west-2" } | |
variable "access_key" { } | |
variable "secret_key" { } | |
variable "acl" { default = "public-read" } | |
variable "policy_file" { default = "policy.json.tpl" } | |
variable "index" { default = "index.html" } | |
provider "aws" { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
Containers: | |
test: | |
... | |
Limits: | |
cpu: 500m | |
memory: 64Mi | |
Requests: | |
cpu: 500m | |
memory: 64Mi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: kubee | |
spec: | |
containers: | |
- name: test | |
image: nginx | |
ports: | |
- containerPort: 80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Provision EC2 Box | |
local_action: | |
module: ec2 | |
key_name: "{{ ec2_keypair }}" | |
group_id: "{{ ec2_security_group }}" | |
instance_type: "{{ ec2_instance_type }}" | |
image: "{{ ec2_image }}" | |
vpc_subnet_id: "{{ ec2_subnet_ids|random }}" | |
region: "{{ ec2_region }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
connection: local | |
gather_facts: false | |
user: root | |
pre_tasks: | |
- include_vars: ec2_vars/{{type}}.yml | |
roles: | |
- provision-ec2 |