From 9b48f36555d3c0a4e92f7a940fafc6eb69dec548 Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Tue, 13 Dec 2022 11:55:25 -0800 Subject: infra: fix hetzner_storagebox ssm variable --- jinwei.me/config/roles/debian_init/tasks/main.yaml | 10 ++++++++-- jinwei.me/infra/samba.tf | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/jinwei.me/config/roles/debian_init/tasks/main.yaml b/jinwei.me/config/roles/debian_init/tasks/main.yaml index e33f32b..ff13181 100644 --- a/jinwei.me/config/roles/debian_init/tasks/main.yaml +++ b/jinwei.me/config/roles/debian_init/tasks/main.yaml @@ -62,7 +62,7 @@ daemon_reload: true - name: Clean unneeded packages - ansible.builtin.apt: + apt: autoremove: true purge: true @@ -71,7 +71,7 @@ content: | username={{ lookup('aws_ssm', '/jinwei-me/hetzner/username') }} password={{ lookup('aws_ssm', '/jinwei-me/hetzner/password') }} - dest: {{ user_home }}/.credential + dest: "{{ user_home }}/.credential" mode: 0600 become: true become_user: admin @@ -85,6 +85,12 @@ path: "{{ samba_mount_point }}" become: true +- name: Create directory + file: + path: "{{ samba_mount_point }}" + state: directory + mode: '0755' + - name: Do the actual mount shell: | mount "{{ samba_mount_point }}" diff --git a/jinwei.me/infra/samba.tf b/jinwei.me/infra/samba.tf index 62fadc1..2f99a4a 100644 --- a/jinwei.me/infra/samba.tf +++ b/jinwei.me/infra/samba.tf @@ -13,5 +13,5 @@ resource "aws_ssm_parameter" "hetzner_password" { resource "aws_ssm_parameter" "hetzner_storagebox" { name = "/${local.name}/hetzner/storagebox" type = "SecureString" - value = var.hetzner_password + value = var.hetzner_storagebox } -- cgit v1.2.3