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
| geo $rfc6890 { | |
| default 0; | |
| 10.0.0.0/8 1; | |
| 172.16.0.0/12 1; | |
| 192.168.0.0/16 1; | |
| 100.64.0.0/10 1; | |
| 127.0.0.0/8 1; | |
| } | |
| geo $allowed_ips { |
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
| [[runners]] | |
| name = "${NAME}" | |
| url = "https://git.${DOMAIN}/" | |
| token = "" | |
| executor = "docker" | |
| environment = ["DOCKER_TLS_CERTDIR=", "DOCKER_DRIVER=overlay2"] | |
| [runners.custom_build_dir] | |
| [runners.docker] | |
| tls_verify = false | |
| image = "docker:18.09.5" |
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 -xec | |
| apt-get install -yq libsasl2-modules postfix sasl2-bin | |
| cat << EOF > /etc/postfix/sasl/smtpd.conf | |
| pwcheck_method: saslauthd | |
| mech_list: PLAIN LOGIN | |
| EOF | |
| cp /etc/default/saslauthd /etc/default/saslauthd-postfix |
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 smtplib | |
| from email.mime.text import MIMEText | |
| from email.mime.multipart import MIMEMultipart | |
| import email.utils | |
| message = MIMEMultipart('alternative') | |
| message['From'] = 'Sender Name <${USER}@${DOMAIN}>' | |
| message['To'] = 'Receiver Name <${TO}>' | |
| message['Subject'] = 'Any subject' | |
| message['Message-Id'] = email.utils.make_msgid() |
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 os | |
| import yaml | |
| # CURRENT NAME CLUSTER AUTHINFO NAMESPACE | |
| # group1-cluster1@kubernetes group1-cluster1 group1-cluster1 | |
| # group1-cluster2@group1-cluster2 group1-cluster2 group1-cluster2 | |
| # group2-cluster1@group2-cluster1 group2-cluster1 group2-cluster1 | |
| # * group2-cluster2@group2-cluster2 group2-cluster2 group2-cluster2 |
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 -xe | |
| wget https://github.com/grafana/loki/releases/download/v2.0.0/promtail-linux-amd64.zip | |
| unzip promtail-linux-amd64.zip | |
| mv promtail-linux-amd64 /usr/local/bin/promtail | |
| cat << EOF > /etc/systemd/system/promtail.service | |
| [Unit] |
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: k8s-cluster | |
| gather_facts: yes | |
| vars: | |
| version: 1.0.1 | |
| tasks: | |
| - unarchive: | |
| src: "https://github.com/prometheus/node_exporter/releases/download/v{{ version }}/node_exporter-{{ version }}.linux-amd64.tar.gz" |
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 -xec | |
| export DOMAIN= | |
| rm -rf /etc/nginx/client_ssl | |
| mkdir -p /etc/nginx/client_ssl | |
| cd /etc/nginx/client_ssl | |
| openssl req -new -newkey rsa:2048 -nodes -keyout ca.key -sha256 -x509 -days 3650 -subj "/CN=${DOMAIN}" -out ca.crt |
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
| stages: | |
| - test | |
| include: | |
| - template: Dependency-Scanning.gitlab-ci.yml | |
| - template: Security/SAST.gitlab-ci.yml | |
| - template: Container-Scanning.gitlab-ci.yml |
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 | |
| gather_facts: no | |
| vars: | |
| api_token: "${API_TOKEN_HERE}" | |
| limit: 25 | |
| tasks: | |
| - uri: | |
| url: "https://api.digitalocean.com/v2/droplets?page=1&per_page={{ limit }}" | |
| return_content: yes |