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: Remove a file, if present | |
win_file: | |
path: C:\Temp\foo.conf | |
state: absent |
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
############################################################### | |
############### PREREQUISITE ################################# | |
## Make Sure that "Access for less secure apps has been turned on" in you Gmail account by following the below link | |
## LINK: https://myaccount.google.com/lesssecureapps | |
## If Not your email will not be delivered and you will recieve a Warning Notifcation like "Review blocked sign-in attempt" | |
--- | |
- name: Sending email | |
mail: | |
host: smtp.gmail.com |
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
READ BELOW DOCS BY NEXT CLASSSSSSSSSSSSSSSSSSS | |
Installation - http://docs.ansible.com/ansible/latest/intro_installation.html#latest-release-via-yum | |
Inventory - http://docs.ansible.com/ansible/latest/intro_inventory.html | |
adhhoc commands - http://docs.ansible.com/ansible/latest/intro_adhoc.html | |
22-07-2017 |
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
--------------------------------READ DAILY-------------------------------------- | |
https://aws.amazon.com/blogs/aws/ | |
https://aws.amazon.com/about-aws/whats-new/2017/ | |
----------------------------------------------------------------------------------- | |
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html?icmpid=docs_ec2_console | |
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html |
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
import boto3 | |
import time | |
import datetime | |
print "Function Start Time: "+ str(datetime.datetime.now()) | |
Region='us-east-1' | |
ASG_Name='awseb-e-3rreanw3r3-stack-AWSEBAutoScalingGroup-C20XEFG034MN' | |
Draining_Time='20' | |
ELB_Name='awseb-e-3-AWSEBLoa-PPG010DUGCPK' | |
ASG_Instance_Count=3 | |
asg_client = boto3.client('autoscaling',region_name=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
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
yum install -y --enablerepo=epel php-mcrypt |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDE+62qMDTvS1YYy4CRshoReFUV/CHYpa5nxsZdDlSxcK0BJo3++qUG0EGEsADvXur9EWRF0n0mFMxyqh/KbdYWFpLUf/O7u5GDamnPmGdtD/tzkoDln31uem+bKTgEqGAnz9jEHa6d4Ar5nO0C+h4wt0zHvGvEvyStqreikNxp8bBzNSAaRg/CMG+9EmZNs6U+w1aRWBIz/t1Q8QcPcifFF/Nw54+dZN+VBIqscu0ka5+DFg61xEFuuGXWEdJtQzYdcPNIgOWfnQfr4yH+wxUGg+yjqEdVpWMfTrY3ZafZYG6FmN5lqGFFs2hhwJMOdQtgito9fL4VHPJNm9bcB9uv [email protected] |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Parameters": { | |
"BucketPrefix": { | |
"Type": "String", | |
"Default": "test-bucket-name" | |
}, | |
"LambdaFunctionName": { | |
"Type": "String", | |
"Default": "test-function-name" |
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
resource "aws_security_group_rule" "ELBIngressRule" { | |
type = "ingress" | |
from_port = 0 | |
to_port = 65535 | |
protocol = "-1" | |
# Allow all traffic from ALB to workerNodes | |
source_security_group_id = "${var.elb_security_group}" | |
security_group_id = "${aws_security_group.NodeSecurityGroup.id}" | |
} |
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
import boto3 | |
import re | |
import requests | |
from requests_aws4auth import AWS4Auth | |
region = 'us-east-1' | |
service = 'es' | |
credentials = boto3.Session().get_credentials() | |
awsauth = AWS4Auth(credentials.access_key, credentials.secret_key, region, service, session_token=credentials.token) | |
host='XXXXXX' | |
RoleArn = 'arn:aws:iam::XXXX:role/cross-account-role' |
OlderNewer