Moved off AWS. (#2)

- Instance in Hetzner.
- Data stored in Backblaze B2.

Reviewed-on: #2
Co-authored-by: M. V. Hutz <git@maximhutz.me>
Co-committed-by: M. V. Hutz <git@maximhutz.me>
This commit is contained in:
2025-09-12 00:07:17 +00:00
committed by Maxim Hutz
parent 23cf397581
commit 23120b9559
25 changed files with 517 additions and 611 deletions

38
playbooks/provision.yml Normal file
View File

@@ -0,0 +1,38 @@
- name: Deploy terraform infrastructure.
hosts: localhost
gather_facts: false
vars_files:
- ../vault.yml
tasks:
- name: Reconfigure and plan.
community.general.terraform:
project_path: '../terraform'
state: "planned"
plan_file: plan.out
# init_reconfigure: true
backend_config: "{{ terraform.backend }}"
variables: "{{ terraform.variables }}"
complex_vars: true
- name: Apply.
community.general.terraform:
project_path: '../terraform'
state: "present"
plan_file: plan.out
backend_config: "{{ terraform.backend }}"
variables: "{{ terraform.variables }}"
complex_vars: true
register: terraform_apply
- name: Create secret directory.
ansible.builtin.file:
path: ../dist
recurse: true
mode: "0755"
state: directory
- name: Send outputs to file.
ansible.builtin.copy:
content: "{{ terraform_apply.outputs }}"
dest: ../dist/terraform_outputs.yml
mode: '0755'