Skip to content

Commit

Permalink
add script to create extended hsm resource.
Browse files Browse the repository at this point in the history
  • Loading branch information
estenrye committed Oct 26, 2021
1 parent ac8f401 commit 6e6eede
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
4 changes: 0 additions & 4 deletions ansible/roles/nitrokey_hsm_import_certs/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
group: root
become: true

# TODO:
# - I need to figure out how nodes 02 and 03 will get hsm_bank_vaults_key_ref_id
# - initial thoughts are having node 01 write a json list to a file [ { id: name } ]
# - and copy it to the container.
- name: copy extracted bank-vaults key to node
ansible.builtin.copy:
src: /tmp/pki/
Expand Down
7 changes: 7 additions & 0 deletions ansible/roles/patch_hsm_resource/files/patch_hsm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
kubectl proxy &
sleep 5
curl --header "Content-Type: application/json-patch+json" \
--request PATCH \
--data '[{"op": "add", "path": "/status/capacity/nitrokey.com~1hsm", "value": "2"}]' \
http://localhost:8001/api/v1/nodes/${NODE}/status
4 changes: 3 additions & 1 deletion ansible/roles/patch_hsm_resource/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
-
# TODO: Retrieve a list of nodes from the inventory group `node`

# TODO: For each node, run patch_hsm.sh.
1 change: 1 addition & 0 deletions ansible/roles/visual_studio_code/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ vs_code_extensions:
- samuelcolvin.jinjahtml
- github.vscode-pull-request-github
- golang.go
- gruntfuggly.todo-tree

0 comments on commit 6e6eede

Please sign in to comment.