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: 'Verify if directories already exists' | |
stat: | |
path: "{{ playbook_dir }}/roles/{{ new_role_name }}/{{item.dest}}" | |
register: folder_stats | |
loop: | |
- { dest: "tasks" } | |
- { dest: "templates" } | |
- { dest: "defaults" } | |
- { dest: "handlers" } |
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: 'Register Test VPC into a var' | |
ec2_vpc_net_facts: | |
filters: | |
"tag:Name": test-vpc | |
register: vpctest | |
# You probably need to change the IP for something at your side | |
- name: 'Creating Customer Gateway' | |
ec2_customer_gateway: |
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: set up VPN with tunnel options utilizing 'TunnelInsideCidr' only | |
ec2_vpc_vpn: | |
state: present | |
filters: | |
vpn: vpn-XXXXXXXX | |
static_only: true | |
tunnel_options: | |
- | |
TunnelInsideCidr: '169.254.100.1/30' | |
- |
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 | |
cat >> ./file1.text <<EOF | |
YOUR_NAME: '$RELEASE_NAME' | |
YOUR_ADDR: '$RELEASE_NAMESPACE' | |
EOF | |
cat >> ./file2.text <<EOF | |
MY_NAME: '$RELEASE_NAME' | |
MY_ADDR: '$RELEASE_NAMESPACE' |
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
{ | |
"id": "/prometheus/node-exporter", | |
"acceptedResourceRoles": [ | |
"*" | |
], | |
"backoffFactor": 1.15, | |
"backoffSeconds": 1, | |
"cmd": "node_exporter-0.17.0.linux-amd64/node_exporter --collector.systemd --collector.interrupts --web.listen-address :$PORT0", | |
"constraints": [ | |
[ |
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
# This triggers the s3-backup you configure in your percona universe task, the dcos cli basically performs this call. With this you can configure a jenkins or other task to perform a weekly backup | |
curl -H 'Accept-encoding: gzip' -H "Content-Type: application/json" -H "Authorization: token=${MY_TOKEN}" -X POST https://master.mesos/service/percona-server-mongodb/v1/plans/backup-s3/start -d "{ }" | |
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
[Unit] | |
Description=vault server | |
Documentation=https://vaultproject.io/docs/ | |
After=network.target | |
ConditionFileNotEmpty=/etc/vault/vault-config.hcl | |
[Service] | |
User=vault | |
Group=vault | |
PrivateDevices=yes |
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
# Generate the elastic IP for the loadbalancer | |
resource "aws_eip" "test-lb" { | |
vpc = true | |
lifecycle { | |
create_before_destroy = "true" | |
} | |
} | |
# Generate the target group for the load balancer to use | |
resource "aws_lb_target_group" "test-lb-tg" { |
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
https://t.co/z1xdVVioMh?amp=1 |
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
# --- templates and variables --- | |
class Profile(Struct): | |
web_version = Default(String, '0.0.5') | |
rclone_version = Default(String, '0.0.9') | |
parent_environment = Default(String, 'test') | |
instances = Default(Integer, 2) | |
cluster = Default(String, 'one') | |
role = Default(String, 'test') | |
environment = Required(String) |