aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2020-10-25 19:11:13 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2020-10-25 19:11:13 +0100
commit59f913cc1efa21bd8df1a395d4d20f0b451965c2 (patch)
tree6d5c86e1154d022ca9ce4843726f02879f5cc22b /ansible
parent5838f6791c7a7bae297f67c18b240716e608c761 (diff)
downloadinfra-59f913cc1efa21bd8df1a395d4d20f0b451965c2.tar.gz
infra-59f913cc1efa21bd8df1a395d4d20f0b451965c2.tar.bz2
infra-59f913cc1efa21bd8df1a395d4d20f0b451965c2.tar.xz
infra-59f913cc1efa21bd8df1a395d4d20f0b451965c2.zip
o Removing experiments.
Diffstat (limited to 'ansible')
-rw-r--r--ansible/experiments/elasticsearch-server/tasks/main.yml17
-rw-r--r--ansible/experiments/strongswan/files/swanctl/CA/ca-cert.derbin834 -> 0 bytes
-rw-r--r--ansible/experiments/strongswan/files/swanctl/CA/ca-key.derbin1191 -> 0 bytes
-rw-r--r--ansible/experiments/strongswan/files/swanctl/arius/rsa/arius-key.derbin1190 -> 0 bytes
-rw-r--r--ansible/experiments/strongswan/files/swanctl/arius/x509/arius-cert.derbin806 -> 0 bytes
-rw-r--r--ansible/experiments/strongswan/roles/strongswan-rw/tasks/main.yml21
-rw-r--r--ansible/experiments/strongswan/roles/strongswan-rw/templates/swanctl.conf34
-rw-r--r--ansible/experiments/strongswan/strongswan-rw.yml9
-rw-r--r--ansible/experiments/strongswan/strongswan-server.yml67
-rw-r--r--ansible/experiments/strongswan/strongswan-vars.yml7
-rw-r--r--ansible/experiments/strongswan/strongswan.md18
11 files changed, 0 insertions, 173 deletions
diff --git a/ansible/experiments/elasticsearch-server/tasks/main.yml b/ansible/experiments/elasticsearch-server/tasks/main.yml
deleted file mode 100644
index 0019cb6..0000000
--- a/ansible/experiments/elasticsearch-server/tasks/main.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-- become: yes
- tags:
- - elasticsearch-server
- block:
- - name: Create elasticsearch user
- user:
- name: elasticsearch
- system: yes
- state: "{{ elasticsearch_server__state }}"
- shell: /bin/bash
- - name: Download ES
- when: elasticsearch_server__state == 'present'
- get_url:
- url: "https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{{ elasticsearch_server__version }}.tar.gz"
- checksum: "{{ elasticsearch_server__checksum }}"
- dest: /opt/elasticsearch
- mode: u=rwx,go=rx
diff --git a/ansible/experiments/strongswan/files/swanctl/CA/ca-cert.der b/ansible/experiments/strongswan/files/swanctl/CA/ca-cert.der
deleted file mode 100644
index 73e9b45..0000000
--- a/ansible/experiments/strongswan/files/swanctl/CA/ca-cert.der
+++ /dev/null
Binary files differ
diff --git a/ansible/experiments/strongswan/files/swanctl/CA/ca-key.der b/ansible/experiments/strongswan/files/swanctl/CA/ca-key.der
deleted file mode 100644
index 740545a..0000000
--- a/ansible/experiments/strongswan/files/swanctl/CA/ca-key.der
+++ /dev/null
Binary files differ
diff --git a/ansible/experiments/strongswan/files/swanctl/arius/rsa/arius-key.der b/ansible/experiments/strongswan/files/swanctl/arius/rsa/arius-key.der
deleted file mode 100644
index 5c988d9..0000000
--- a/ansible/experiments/strongswan/files/swanctl/arius/rsa/arius-key.der
+++ /dev/null
Binary files differ
diff --git a/ansible/experiments/strongswan/files/swanctl/arius/x509/arius-cert.der b/ansible/experiments/strongswan/files/swanctl/arius/x509/arius-cert.der
deleted file mode 100644
index 562c76b..0000000
--- a/ansible/experiments/strongswan/files/swanctl/arius/x509/arius-cert.der
+++ /dev/null
Binary files differ
diff --git a/ansible/experiments/strongswan/roles/strongswan-rw/tasks/main.yml b/ansible/experiments/strongswan/roles/strongswan-rw/tasks/main.yml
deleted file mode 100644
index fb09476..0000000
--- a/ansible/experiments/strongswan/roles/strongswan-rw/tasks/main.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-- name: packages
- apt:
- name: "{{ item }}"
- install_recommends: no
- with_items:
- - strongswan-swanctl
-- name: Install CA certificate
- copy:
- src=swanctl/CA/ca-cert.der
- dest=/etc/swanctl/x509ca/ca-cert.der
-- name: Install key
- copy:
- src=swanctl/{{ inventory_hostname }}/rsa/{{ inventory_hostname }}-key.der
- dest=/etc/swanctl/rsa/{{ inventory_hostname }}-key.der
-- name: Install certificate
- copy:
- src=swanctl/{{ inventory_hostname }}/x509/{{ inventory_hostname }}-cert.der
- dest=/etc/swanctl/x509/{{ inventory_hostname }}-cert.der
-- template:
- src: swanctl.conf
- dest: /etc/swanctl/conf.d/trygvis.io.conf
diff --git a/ansible/experiments/strongswan/roles/strongswan-rw/templates/swanctl.conf b/ansible/experiments/strongswan/roles/strongswan-rw/templates/swanctl.conf
deleted file mode 100644
index 90d212b..0000000
--- a/ansible/experiments/strongswan/roles/strongswan-rw/templates/swanctl.conf
+++ /dev/null
@@ -1,34 +0,0 @@
-connections {
-
- home {
- local_addrs = {{ strongswan_rw[inventory_hostname].local_addrs }}
- remote_addrs = {{ strongswan_home_addrs }}
-
- local {
- auth = pubkey
- certs = {{ inventory_hostname }}-cert.der
- id = {{ inventory_hostname }}.trygvis.io
- }
- remote {
- auth = pubkey
- id = {{ strongswan_remote_id }}
- }
- children {
- home {
- remote_ts = {{ strongswan_ts }}
-
-# updown = /usr/local/libexec/ipsec/_updown iptables
- esp_proposals = aes128-sha256-x25519
- }
- }
- version = 2
- proposals = aes128-sha256-x25519
- }
-}
-
-authorities {
- strongswan {
- cacert = ca-cert.der
- crl_uris = http://ip6-winnetou.strongswan.org/strongswan.crl
- }
-}
diff --git a/ansible/experiments/strongswan/strongswan-rw.yml b/ansible/experiments/strongswan/strongswan-rw.yml
deleted file mode 100644
index 136e9ad..0000000
--- a/ansible/experiments/strongswan/strongswan-rw.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-- hosts:
- - arius
- vars_files:
- - strongswan-vars.yml
- tasks:
- - name: strongswan-rw
- import_role: name=strongswan-rw
- tags: strongswan-rw
- become: yes
diff --git a/ansible/experiments/strongswan/strongswan-server.yml b/ansible/experiments/strongswan/strongswan-server.yml
deleted file mode 100644
index e555b90..0000000
--- a/ansible/experiments/strongswan/strongswan-server.yml
+++ /dev/null
@@ -1,67 +0,0 @@
-- hosts:
- - knot
- vars_files:
- - strongswan-vars.yml
- vars:
- peers:
- - arius
- handlers:
- - name: systemctl restart strongswan
- become: true
- systemd:
- name: strongswan
- state: restarted
- tasks:
- - become: true
- block:
- - name: packages
- apt:
- name: "{{ item }}"
- install_recommends: no
- with_items:
- - strongswan-swanctl
- - name: install certs
- with_items: "{{ peers }}"
- copy:
- src=swanctl/{{ item }}/rsa/{{ item }}-key.der
- dest=/etc/swanctl/rsa/{{ item }}-key.der
- - name: install swanctl.conf
- notify: systemctl restart strongswan
- copy:
- dest: /etc/swanctl/conf.d/trygvis.io.conf
- content: |
- connections {
-
- rw {
- local_addrs = fec0::1
-
- local {
- auth = pubkey
- certs = moonCert.pem
- id = moon.strongswan.org
- }
- remote {
- auth = pubkey
- }
- children {
- net {
- local_ts = {{ strongswan_ts }}
-
- updown = /usr/local/libexec/ipsec/_updown iptables
- esp_proposals = aes128-sha256-x25519
- }
- }
- version = 2
- proposals = aes128-sha256-x25519
- }
- }
-
- authorities {
- strongswan {
- #cacert = caCert.pem
- #crl_uris = http://ip6-winnetou.strongswan.org/strongswan.crl
- cacert = ca-cert.der
- crl_uris =
- }
- }
-
diff --git a/ansible/experiments/strongswan/strongswan-vars.yml b/ansible/experiments/strongswan/strongswan-vars.yml
deleted file mode 100644
index e72b040..0000000
--- a/ansible/experiments/strongswan/strongswan-vars.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-strongswan_rw:
- arius:
- local_addrs: fc00:0002::2
-
-strongswan_home_addrs: fc00:0001::1
-strongswan_ts: fc00:0001::0/32
-strongswan_remote_id: knot.trygvis.io
diff --git a/ansible/experiments/strongswan/strongswan.md b/ansible/experiments/strongswan/strongswan.md
deleted file mode 100644
index 4258037..0000000
--- a/ansible/experiments/strongswan/strongswan.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# CA certificate
-
- mkdir -p files/swanctl/CA
- pki --gen > files/swanctl/CA/ca-key.der
- pki --self \
- --in files/swanctl/CA/ca-key.der \
- --dn "C=NO, O=Trygvis IO AS, CN=Trygvis IO CA" \
- --ca > files/swanctl/CA/ca-cert.der
-
-# Peer certificate
-
- mkdir -p files/swanctl/$host/{rsa,x509}
- pki --gen > files/swanctl/$host/rsa/$host-key.der
- pki --pub --in files/swanctl/$host/rsa/$host-key.der | \
- pki --issue \
- --cakey files/swanctl/CA/ca-key.der \
- --cacert files/swanctl/CA/ca-cert.der \
- --dn "C=NO, O=Trygvis IO AS, CN=$host.trygvis.io" > files/swanctl/$host/x509/$host-cert.der