summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chaos-at-home/ch-mimas2.yml7
-rw-r--r--chaos-at-home/group_vars/chaos-at-home.yml23
-rw-r--r--inventory/host_vars/ch-mimas2.yml10
-rw-r--r--inventory/host_vars/ele-lt.yml10
-rw-r--r--inventory/host_vars/sk-2019vm.yml4
-rw-r--r--inventory/host_vars/sk-cloudia.yml4
-rw-r--r--inventory/hosts.ini2
-rw-r--r--roles/cloud/install/tasks/hcloud.yml10
-rw-r--r--roles/cloud/install/tasks/hroot.yml22
9 files changed, 65 insertions, 27 deletions
diff --git a/chaos-at-home/ch-mimas2.yml b/chaos-at-home/ch-mimas2.yml
new file mode 100644
index 00000000..2ece9b1f
--- /dev/null
+++ b/chaos-at-home/ch-mimas2.yml
@@ -0,0 +1,7 @@
+---
+- name: Basic Setup
+ hosts: ch-mimas2
+ roles:
+ - role: base
+ - role: sshd
+ - role: zsh
diff --git a/chaos-at-home/group_vars/chaos-at-home.yml b/chaos-at-home/group_vars/chaos-at-home.yml
index 8fe4c3f3..1d7a0592 100644
--- a/chaos-at-home/group_vars/chaos-at-home.yml
+++ b/chaos-at-home/group_vars/chaos-at-home.yml
@@ -1,10 +1,15 @@
$ANSIBLE_VAULT;1.2;AES256;chaos-at-home
-36333032363330643036663937323235396334386536396338353339323332323635356330343366
-3932643866616333653531666338333966343462653439360a623235333936393031613666626435
-66336531666331623031363565333230633134623231643038393737306333353535383564393664
-3932353863316462360a643738633861623564353438313463303464666338623332303562336363
-32653136633232383431623732613135363836346439363166663964323638393761666465313336
-38643962323661303931636433343131643566343530383231666165353236333038323265383337
-34383663376630336139363931633863326465366161343531633338383731393362633761666334
-31323830323766383137653438663363353133366331663831386664303530353637393362336665
-65656164373665356237386336343430333138336138353037636332313035326661
+36623463376337323134376232343866313966646163643861343539316561363630313531313465
+6266303061316463353463653036303933613632396530310a363061313233396564656636313439
+66303230316363346438336132343137626366373662336665303637383430356463633536663832
+3362643836373533650a653439626130376332393862313236653631356434653661363362333536
+61333863303435656336623966373838333261363835613063353730333739643765396363613935
+30353461306337616166643337386263653131306537663232626337303837383733356236633236
+66336334333434656339616330333136306337383136353861363333326638643362653462633264
+64646565646233333163316364626436346438653937363261333733376335373264633137636165
+66313836393631623431623437323964383938353232323634653063613636323233346430643330
+63633032663862326638663934323731646439633631323265313431333661376662666430626533
+35613235356135373361333036623838393639613130613735313865656366623139613035343538
+33366238666232633163643433386261366337373561613631333863393034653631306263656632
+30323534613562343763396164343931656335623036663736346235626665303563646236316466
+3563666366323466346338626332623937333934303733626161
diff --git a/inventory/host_vars/ch-mimas2.yml b/inventory/host_vars/ch-mimas2.yml
new file mode 100644
index 00000000..b8f30628
--- /dev/null
+++ b/inventory/host_vars/ch-mimas2.yml
@@ -0,0 +1,10 @@
+---
+install:
+ cloud:
+ credentials:
+ token: "{{ vault_hcloud_api_token }}"
+ server_name: "{{ host_name }}"
+ disks:
+ root_lvm_size: all
+
+network: {}
diff --git a/inventory/host_vars/ele-lt.yml b/inventory/host_vars/ele-lt.yml
index 41380e41..a75c482d 100644
--- a/inventory/host_vars/ele-lt.yml
+++ b/inventory/host_vars/ele-lt.yml
@@ -1,4 +1,14 @@
---
+install:
+ cloud:
+ credentials:
+ token: "{{ vault_hcloud_api_token }}"
+ disks:
+ root_lvm_size: all
+
+network: {}
+
+
liquidtruth_app_user: lt
ssh_allowusers_host:
diff --git a/inventory/host_vars/sk-2019vm.yml b/inventory/host_vars/sk-2019vm.yml
index 34a43bb6..7674188f 100644
--- a/inventory/host_vars/sk-2019vm.yml
+++ b/inventory/host_vars/sk-2019vm.yml
@@ -1,6 +1,8 @@
---
install:
- cloud_credentials: "{{ vault_hroot_robot_account }}"
+ cloud:
+ credentials: "{{ vault_hroot_robot_account }}"
+ server_name: "{{ host_name }}"
disks:
layout: nvme_raid
root_lvm_size: 10G
diff --git a/inventory/host_vars/sk-cloudia.yml b/inventory/host_vars/sk-cloudia.yml
index b169d5b5..b844b4d3 100644
--- a/inventory/host_vars/sk-cloudia.yml
+++ b/inventory/host_vars/sk-cloudia.yml
@@ -1,6 +1,8 @@
---
install:
- cloud_credentials: "{{ vault_hroot_robot_account }}"
+ cloud:
+ credentials: "{{ vault_hroot_robot_account }}"
+ server_name: "{{ host_name }}"
disks:
layout: nvme_raid
root_lvm_size: 15G
diff --git a/inventory/hosts.ini b/inventory/hosts.ini
index 6b26014a..41804d59 100644
--- a/inventory/hosts.ini
+++ b/inventory/hosts.ini
@@ -17,6 +17,7 @@ ch-atlas host_name=atlas
ch-pan host_name=pan
ch-keyserver host_name=keyserver
ch-testvm host_name=testvm
+ch-mimas2 host_name=mimas
ch-gnocchi host_name=gnocchi
ch-router host_name=router
ch-gw-lan host_name=gw-lan
@@ -199,6 +200,7 @@ sk-cloudia
sk-2019vm
[hcloud]
+ch-mimas2
emc-00
ele-lt
diff --git a/roles/cloud/install/tasks/hcloud.yml b/roles/cloud/install/tasks/hcloud.yml
index ca5435b8..646d80da 100644
--- a/roles/cloud/install/tasks/hcloud.yml
+++ b/roles/cloud/install/tasks/hcloud.yml
@@ -4,17 +4,17 @@
url: "https://api.hetzner.cloud/v1/ssh_keys"
method: GET
headers:
- Authorization: "Bearer {{ install_cooked.cloud_credentials.token }}"
+ Authorization: "Bearer {{ install_cooked.cloud.credentials.token }}"
status_code: 200
register: sshkeys
delegate_to: localhost
- name: retrieve server id and check if rescue mode is already active
uri:
- url: "https://api.hetzner.cloud/v1/servers?name={{ inventory_hostname }}"
+ url: "https://api.hetzner.cloud/v1/servers?name={{ install_cooked.cloud.server_name | default(inventory_hostname) }}"
method: GET
headers:
- Authorization: "Bearer {{ install_cooked.cloud_credentials.token }}"
+ Authorization: "Bearer {{ install_cooked.cloud.credentials.token }}"
status_code: 200
register: serverstatus
delegate_to: localhost
@@ -33,7 +33,7 @@
method: POST
body: "{{ {'type': 'linux64', 'ssh_keys': (sshkeys.json.ssh_keys | map(attribute='id') | list) } | to_nice_json }}"
headers:
- Authorization: "Bearer {{ install_cooked.cloud_credentials.token }}"
+ Authorization: "Bearer {{ install_cooked.cloud.credentials.token }}"
Content-Type: "application/json"
status_code: 201
delegate_to: localhost
@@ -43,7 +43,7 @@
url: "https://api.hetzner.cloud/v1/servers/{{ serverstatus.json.servers[0].id }}/actions/reset"
method: POST
headers:
- Authorization: "Bearer {{ install_cooked.cloud_credentials.token }}"
+ Authorization: "Bearer {{ install_cooked.cloud.credentials.token }}"
status_code: 201
delegate_to: localhost
diff --git a/roles/cloud/install/tasks/hroot.yml b/roles/cloud/install/tasks/hroot.yml
index 606df5f6..86f52714 100644
--- a/roles/cloud/install/tasks/hroot.yml
+++ b/roles/cloud/install/tasks/hroot.yml
@@ -3,8 +3,8 @@
uri:
url: "https://robot-ws.your-server.de/key"
method: GET
- user: "{{ install_cooked.cloud_credentials.username }}"
- password: "{{ install_cooked.cloud_credentials.password }}"
+ user: "{{ install_cooked.cloud.credentials.username }}"
+ password: "{{ install_cooked.cloud.credentials.password }}"
force_basic_auth: yes
status_code: 200
register: sshkeys
@@ -22,8 +22,8 @@
uri:
url: "https://robot-ws.your-server.de/server"
method: GET
- user: "{{ install_cooked.cloud_credentials.username }}"
- password: "{{ install_cooked.cloud_credentials.password }}"
+ user: "{{ install_cooked.cloud.credentials.username }}"
+ password: "{{ install_cooked.cloud.credentials.password }}"
force_basic_auth: yes
status_code: 200
register: servers
@@ -32,7 +32,7 @@
- name: extract server IP address from robot result
set_fact:
- hetzner_main_ip: "{{ servers.json | hroot_extract_serverip(host_name) }}"
+ hetzner_main_ip: "{{ servers.json | hroot_extract_serverip(install_cooked.cloud.server_name | default(inventory_hostname)) }}"
when: hetzner_main_ip is not defined
@@ -48,8 +48,8 @@
uri:
url: "https://robot-ws.your-server.de/boot/{{ hetzner_main_ip }}/rescue"
method: GET
- user: "{{ install_cooked.cloud_credentials.username }}"
- password: "{{ install_cooked.cloud_credentials.password }}"
+ user: "{{ install_cooked.cloud.credentials.username }}"
+ password: "{{ install_cooked.cloud.credentials.password }}"
force_basic_auth: yes
status_code: 200
register: rescuestatus
@@ -62,8 +62,8 @@
uri:
url: "https://robot-ws.your-server.de/boot/{{ hetzner_main_ip }}/rescue"
method: POST
- user: "{{ install_cooked.cloud_credentials.username }}"
- password: "{{ install_cooked.cloud_credentials.password }}"
+ user: "{{ install_cooked.cloud.credentials.username }}"
+ password: "{{ install_cooked.cloud.credentials.password }}"
force_basic_auth: yes
body: "os=linux&arch=64&authorized_key[]={{ sshkeys.json | hroot_extract_ssh_key_fingerprints | join('&authorized_key[]=') }}"
status_code: 200
@@ -79,8 +79,8 @@
uri:
url: "https://robot-ws.your-server.de/reset/{{ hetzner_main_ip }}"
method: POST
- user: "{{ install_cooked.cloud_credentials.username }}"
- password: "{{ install_cooked.cloud_credentials.password }}"
+ user: "{{ install_cooked.cloud.credentials.username }}"
+ password: "{{ install_cooked.cloud.credentials.password }}"
force_basic_auth: yes
body: "type=hw"
status_code: 200