Commit 0d4e1425 authored by Sven-Hendrik Haase's avatar Sven-Hendrik Haase
Browse files

Allow ansible to use the hcloud token

parent a5b7c2fc
......@@ -11,8 +11,8 @@ run the provisioning script: `ansible-playbook playbooks/tasks/install-arch.yml
The provisioning script configures a sane basic systemd with sshd. By design, it is NOT idempotent.
After the provisioning script has run, it is safe to reboot.
Once in the new system, run the regular playbook: `ansible-playbook playbooks/$hostname.yml`. This
playbook is the one regularity used for administrating the server and is entirely idempotent.
Once in the new system, run the regular playbook: `HCLOUD_TOKEN=$(misc/get_hcloud_api_key_ansible.sh) ansible-playbook playbooks/$hostname.yml`.
This playbook is the one regularity used for administrating the server and is entirely idempotent.
##### Note about first time certificates
......@@ -29,7 +29,7 @@ Note that some roles already run this automatically.
We use packer to build snapshots on hcloud to use as server base images.
In order to use this, you need to install packer and then run
packer build -var $(./packer/get_hetzner_cloud_api_key.sh) packer/archlinux.json
packer build -var $(./misc/get_hcloud_api_key_packer.sh) packer/archlinux.json
This will take some time after which a new snapshot will have been created on the primary hcloud archlinux project.
......@@ -38,12 +38,12 @@ This will take some time after which a new snapshot will have been created on th
We use terraform to provision a part of the infrastructure on hcloud.
In order to use this, you need to install terraform and then run
terraform plan -var $(./packer/get_hetzner_cloud_api_key.sh) terraform
terraform plan -var $(./misc/get_hcloud_api_key_packer.sh) terraform
This will show you planned changes between the current infrastructure and the desired infrastructure.
You can then run
terraform apply -var $(./packer/get_hetzner_cloud_api_key.sh) terraform
terraform apply -var $(./packer/get_hcloud_api_key_packer.sh) terraform
to actually apply your changes.
......
[defaults]
inventory = hosts,hcloud.yml
inventory = hosts,inventory_hcloud.yml
library = library
remote_tmp = $HOME/.ansible/tmp
remote_user = root
......
#!/bin/bash
ansible-vault view misc/hetzner-password.vault | grep hetzner_cloud_api_key | cut -f2 -d' '
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment