initial ansible code

This commit is contained in:
Oli
2022-10-09 21:41:56 +00:00
parent 4a64eab4a0
commit feaec34dd2
103 changed files with 4473 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
$ANSIBLE_VAULT;1.2;AES256;dtsv-dev
61613262653734376165353363343366363661616561636563306430613665343137643863613632
6432336361373838643733306565313830373065363663620a306163373632626366303837373530
34393833656466326339383538363933313738616131373338336534393538366262306462616432
6334343936346339320a333336623532383230643738333938366336636565343762376138333066
36333964373865666534373830376132343636336139613835663830383432386237623935303239
64613636316565326334643962326133313364323966303837303739653634373638326335623563
38653763376234376533643561356561666438323238396162313662383566646362313732346538
36376166313132393839383763393835626435333537313531323134373639303462373564613234
34356664316562623336383535383431363366653238373130363362376361383361643762623533
35323136333731343734393236613331616531343962366132653730613561346564316132396237
64393163373561383961303137313666336338376161356464313563373031393463623266396138
39653561663838393239633462626231313932386339623035396463623236633861333562666163
65333035613038366639653565623362343163313561636666356364333263366162383639313363
35636436376665626265643535663234623462626462633361373639613730616665346535626631
31666333386433373734333830336662663331373666313231636437316136613137306233663433
30633839343633366262653365383364366535613761303264353634366138326166316536643830
34646336393939383630376537646538356439346235303036376239646662643933636130363266
39363363393461333736343533643032353462396331336565663262363730336338333236613234
65666535613363616263393933383233646566363962633163366136313636663963346163316430
37313764633636303565366564643763656162396262663834653637613166353438666530303337
34336533393738633862653262313930633336363038313634396666313331356566393436366263
38363064656231393964323736666638316633346339366165633931646564383132353735343461
64393231653039666536643638333431383333613364303438373564663635303763343062313630
39303137656230626531

View File

@@ -0,0 +1,6 @@
---
- name: Install Terraform
import_tasks: terraform.yml
- name: Add SSH config/keys
import_tasks: ssh.yml

View File

@@ -0,0 +1,9 @@
---
- name: Copy SSH config/keys
copy:
src: "ssh/"
dest: "~/.ssh/"
mode: 0600
directory_mode: true
become_user: "{{ main_user }}"

View File

@@ -0,0 +1,16 @@
---
- name: Create .tfvars_token_dtsv
template:
src: "tfvars_token.j2"
dest: "~/.tfvars_token_dtsv"
mode: 0640
become_user: "{{ main_user }}"
- name: Add .tfvars_token to .bash_profile
lineinfile:
path: "~/.bash_profile"
create: true
line: "source ~/.tfvars_token_dtsv"
mode: 0644
become_user: "{{ main_user }}"

View File

@@ -0,0 +1,5 @@
## Managed by Ansible ##
export TF_VAR_dtsv_ionos_token='{{ vault_ionos_token_terraform }}'
export TF_VAR_dtsv_hcloud_token={{ vault_hcloud_token_terraform }}
export TF_VAR_dtsv_hcloud_ssh_key='{{ vault_hcloud_ssh_key }}'

View File

@@ -0,0 +1,4 @@
---
# Hetzner Cloud public ssh key
vault_hcloud_ssh_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFpczZfQ5MrfjSYz8MnDHG4sM2cQ8cIsj3ALDGtmW3zu