Browse Source

add copyright notices to ansible role files

tags/v0.9.9
Jonathan Cobb 4 years ago
parent
commit
a55465869a
37 changed files with 127 additions and 0 deletions
  1. +3
    -0
      automation/roles/algo/files/algo_refresh_users.sh
  2. +3
    -0
      automation/roles/algo/files/algo_refresh_users_monitor.sh
  3. +3
    -0
      automation/roles/algo/files/wg_monitor_connections.sh
  4. +3
    -0
      automation/roles/algo/tasks/algo_firewall.yml
  5. +3
    -0
      automation/roles/algo/tasks/main.yml
  6. +3
    -0
      automation/roles/bubble/files/bsql.sh
  7. +3
    -0
      automation/roles/bubble/files/bubble_restore_monitor.sh
  8. +3
    -0
      automation/roles/bubble/files/init_bubble_db.sh
  9. +3
    -0
      automation/roles/bubble/files/init_roles.sh
  10. +3
    -0
      automation/roles/bubble/files/random_password.sh
  11. +3
    -0
      automation/roles/bubble/files/refresh_bubble_ssh_keys_monitor.sh
  12. +3
    -0
      automation/roles/bubble/handlers/main.yml
  13. +3
    -0
      automation/roles/bubble/tasks/main.yml
  14. +3
    -0
      automation/roles/bubble/tasks/postgresql.yml
  15. +3
    -0
      automation/roles/bubble/tasks/postgresql_data.yml
  16. +3
    -0
      automation/roles/bubble/tasks/restore.yml
  17. +3
    -0
      automation/roles/bubble_finalizer/files/copy_certs_to_bubble.sh
  18. +3
    -0
      automation/roles/bubble_finalizer/tasks/main.yml
  19. +3
    -0
      automation/roles/common/tasks/main.yml
  20. +3
    -0
      automation/roles/firewall/defaults/main.yml
  21. +3
    -0
      automation/roles/firewall/tasks/main.yml
  22. +3
    -0
      automation/roles/firewall/tasks/port_redirect.yml
  23. +3
    -0
      automation/roles/firewall/tasks/sage.yml
  24. +19
    -0
      automation/roles/mitmproxy/files/bubble_passthru.py
  25. +3
    -0
      automation/roles/mitmproxy/files/install_cert.sh
  26. +3
    -0
      automation/roles/mitmproxy/files/mitmdump_monitor.sh
  27. +3
    -0
      automation/roles/mitmproxy/files/reuse_bubble_mitm_certs.sh
  28. +3
    -0
      automation/roles/mitmproxy/files/run_mitmdump.sh
  29. +3
    -0
      automation/roles/mitmproxy/files/set_cert_name.sh
  30. +3
    -0
      automation/roles/mitmproxy/tasks/main.yml
  31. +3
    -0
      automation/roles/mitmproxy/tasks/route.yml
  32. +3
    -0
      automation/roles/nginx/defaults/main.yml
  33. +3
    -0
      automation/roles/nginx/files/certbot_renew.sh
  34. +3
    -0
      automation/roles/nginx/files/init_certbot.sh
  35. +3
    -0
      automation/roles/nginx/handlers/main.yml
  36. +3
    -0
      automation/roles/nginx/tasks/main.yml
  37. +3
    -0
      automation/roles/nginx/tasks/site.yml

+ 3
- 0
automation/roles/algo/files/algo_refresh_users.sh View File

@@ -1,4 +1,7 @@
#!/bin/bash
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#

LOG=/tmp/bubble.algo_refresh_users.log



+ 3
- 0
automation/roles/algo/files/algo_refresh_users_monitor.sh View File

@@ -1,4 +1,7 @@
#!/bin/bash
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#

LOG=/tmp/bubble.algo_refresh_users_monitor.log



+ 3
- 0
automation/roles/algo/files/wg_monitor_connections.sh View File

@@ -1,4 +1,7 @@
#!/bin/bash
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#

LOG=/tmp/bubble.wg_monitor_connections.log



+ 3
- 0
automation/roles/algo/tasks/algo_firewall.yml View File

@@ -1,3 +1,6 @@
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#
# Insert additional firewall rules to allow required services to function
- name: Allow HTTP
iptables:


+ 3
- 0
automation/roles/algo/tasks/main.yml View File

@@ -1,3 +1,6 @@
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#
- name: Unzip algo master.zip
unarchive:
src: master.zip


+ 3
- 0
automation/roles/bubble/files/bsql.sh View File

@@ -1,2 +1,5 @@
#!/bin/bash
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#
PGPASSWORD="$(cat /home/bubble/.BUBBLE_PG_PASSWORD)" psql -U bubble -h 127.0.0.1 bubble "${@}"

+ 3
- 0
automation/roles/bubble/files/bubble_restore_monitor.sh View File

@@ -1,4 +1,7 @@
#!/bin/bash
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#

BUBBLE_HOME="/home/bubble"
RESTORE_MARKER="${BUBBLE_HOME}/.restore"


+ 3
- 0
automation/roles/bubble/files/init_bubble_db.sh View File

@@ -1,4 +1,7 @@
#!/bin/bash
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#

echo "$@" > /tmp/init.args



+ 3
- 0
automation/roles/bubble/files/init_roles.sh View File

@@ -1,4 +1,7 @@
#!/bin/bash
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#

SCRIPT="${0}"
SCRIPT_DIR=$(cd $(dirname ${SCRIPT}) && pwd)


+ 3
- 0
automation/roles/bubble/files/random_password.sh View File

@@ -1,4 +1,7 @@
#!/bin/bash
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#

file=${1:?no file provided}
owner=${2:?no owner provided}


+ 3
- 0
automation/roles/bubble/files/refresh_bubble_ssh_keys_monitor.sh View File

@@ -1,4 +1,7 @@
#!/bin/bash
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#

LOG=/tmp/bubble.ssh_keys_monitor.log



+ 3
- 0
automation/roles/bubble/handlers/main.yml View File

@@ -1,3 +1,6 @@
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#
---
- name: Start Pgsql
service: name=postgresql state=started


+ 3
- 0
automation/roles/bubble/tasks/main.yml View File

@@ -1,3 +1,6 @@
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#
- name: Install OpenJDK 11 JRE (headless), redis, uuid and jq
apt:
name: [ 'openjdk-11-jre-headless', 'redis', 'uuid', 'jq' ]


+ 3
- 0
automation/roles/bubble/tasks/postgresql.yml View File

@@ -1,3 +1,6 @@
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#
- name: Install PostgreSQL
apt:
name: [ 'postgresql-10', 'libpq-dev', 'python-psycopg2' ]


+ 3
- 0
automation/roles/bubble/tasks/postgresql_data.yml View File

@@ -1,3 +1,6 @@
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#
- name: Creates bubble SQL dir
file:
path: /home/bubble/sql


+ 3
- 0
automation/roles/bubble/tasks/restore.yml View File

@@ -1,3 +1,6 @@
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#

- name: Install restore helper scripts
copy:


+ 3
- 0
automation/roles/bubble_finalizer/files/copy_certs_to_bubble.sh View File

@@ -1,4 +1,7 @@
#!/bin/bash
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#

function die {
echo 1>&2 "${1}"


+ 3
- 0
automation/roles/bubble_finalizer/tasks/main.yml View File

@@ -1,3 +1,6 @@
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#
- name: Snapshot ansible roles
shell: snapshot_ansible.sh



+ 3
- 0
automation/roles/common/tasks/main.yml View File

@@ -1,3 +1,6 @@
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#
- name: Set hostname to {{ hostname }}
hostname:
name: '{{ hostname }}'


+ 3
- 0
automation/roles/firewall/defaults/main.yml View File

@@ -1,3 +1,6 @@
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#
fw_enable_http: true
fw_enable_admin: true
fw_enable_dns: true


+ 3
- 0
automation/roles/firewall/tasks/main.yml View File

@@ -1,3 +1,6 @@
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#
- name: Install firewall packages
apt:
name: [ 'haveged', 'iptables-persistent', 'netfilter-persistent', 'autossh' ]


+ 3
- 0
automation/roles/firewall/tasks/port_redirect.yml View File

@@ -1,3 +1,6 @@
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#
- sysctl:
name: net.ipv4.ip_forward
value: 1


+ 3
- 0
automation/roles/firewall/tasks/sage.yml View File

@@ -1,3 +1,6 @@
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#
- name: Allow all from local
iptables:
chain: INPUT


+ 19
- 0
automation/roles/mitmproxy/files/bubble_passthru.py View File

@@ -0,0 +1,19 @@

def next_layer(next_layer):
"""
This hook does the actual magic - if the next layer is planned to be a TLS layer,
we check if we want to enter pass-through mode instead.
"""
if isinstance(next_layer, TlsLayer) and next_layer._client_tls:
server_address = next_layer.server_conn.address

if tls_strategy.should_intercept(server_address):
# We try to intercept.
# Monkey-Patch the layer to get feedback from the TLSLayer if interception worked.
next_layer.__class__ = TlsFeedback
else:
# We don't intercept - reply with a pass-through layer and add a "skipped" entry.
mitmproxy.ctx.log("TLS passthrough for %s" % repr(next_layer.server_conn.address), "info")
next_layer_replacement = RawTCPLayer(next_layer.ctx, ignore=True)
next_layer.reply.send(next_layer_replacement)
tls_strategy.record_skipped(server_address)

+ 3
- 0
automation/roles/mitmproxy/files/install_cert.sh View File

@@ -1,4 +1,7 @@
#!/bin/bash
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#

CERT="${1:?no cert provided}"
TIMEOUT=${2:-0}


+ 3
- 0
automation/roles/mitmproxy/files/mitmdump_monitor.sh View File

@@ -1,4 +1,7 @@
#!/bin/bash
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#

LOG=/tmp/bubble.mitmdump_monitor.log



+ 3
- 0
automation/roles/mitmproxy/files/reuse_bubble_mitm_certs.sh View File

@@ -1,4 +1,7 @@
#!/bin/bash
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#

function die {
echo 1>&2 "${1}"


+ 3
- 0
automation/roles/mitmproxy/files/run_mitmdump.sh View File

@@ -1,4 +1,7 @@
#!/bin/bash
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#

MITM_PORT=${1:?no port provided}
cd /home/mitmproxy/mitmproxy && \


+ 3
- 0
automation/roles/mitmproxy/files/set_cert_name.sh View File

@@ -1,4 +1,7 @@
#!/bin/bash
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#

MITM_DIR=${1:?no mitm dir specified}
CERT_NAME=${2:?no cert name specified}


+ 3
- 0
automation/roles/mitmproxy/tasks/main.yml View File

@@ -1,3 +1,6 @@
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#
- name: Install python3, pip, virtualenv and required dependencies
apt:
name: [ 'python3-pip', 'python3-venv', 'libc6-dev', 'libpython3-dev', 'g++', 'libffi-dev' ]


+ 3
- 0
automation/roles/mitmproxy/tasks/route.yml View File

@@ -1,3 +1,6 @@
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#
- sysctl:
name: net.ipv4.ip_forward
value: 1


+ 3
- 0
automation/roles/nginx/defaults/main.yml View File

@@ -1,3 +1,6 @@
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#
---
# user under which we run acme-tiny and owner of ssl_base_folder
acme_user: acme


+ 3
- 0
automation/roles/nginx/files/certbot_renew.sh View File

@@ -1,4 +1,7 @@
#!/bin/bash
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#

if [[ -d /home/mitmproxy ]] ; then
service mitmproxy stop


+ 3
- 0
automation/roles/nginx/files/init_certbot.sh View File

@@ -1,4 +1,7 @@
#!/bin/bash
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#

LE_EMAIL="${1}"
SERVER_NAME="${2}"


+ 3
- 0
automation/roles/nginx/handlers/main.yml View File

@@ -1,3 +1,6 @@
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#
---
- name: nginx reload
service: name=nginx state=reloaded


+ 3
- 0
automation/roles/nginx/tasks/main.yml View File

@@ -1,3 +1,6 @@
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#
- name: Install OpenSSL, nginx and software-properties-common
apt:
name: [ 'openssl', 'nginx', 'software-properties-common' ]


+ 3
- 0
automation/roles/nginx/tasks/site.yml View File

@@ -1,3 +1,6 @@
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://bubblev.com/bubble-license/
#
- name: Disable default site
file:
path: /etc/nginx/sites-enabled/default


Loading…
Cancel
Save