aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'jinwei.me/config/roles/debian_init/tasks/main.yaml')
-rw-r--r--jinwei.me/config/roles/debian_init/tasks/main.yaml33
1 files changed, 26 insertions, 7 deletions
diff --git a/jinwei.me/config/roles/debian_init/tasks/main.yaml b/jinwei.me/config/roles/debian_init/tasks/main.yaml
index d958cb2..e33f32b 100644
--- a/jinwei.me/config/roles/debian_init/tasks/main.yaml
+++ b/jinwei.me/config/roles/debian_init/tasks/main.yaml
@@ -11,6 +11,7 @@
11 - build-essential 11 - build-essential
12 - ca-certificates 12 - ca-certificates
13 - mariadb-client 13 - mariadb-client
14 - cifs-utils
14 - vnstat 15 - vnstat
15 - lsb-release 16 - lsb-release
16 - python3 17 - python3
@@ -27,13 +28,6 @@
27 - git 28 - git
28 update_cache: true 29 update_cache: true
29 30
30- name: add user
31 user:
32 name: clarkzjw
33 shell: /usr/bin/zsh
34 home: "{{ user_home }}"
35 system: true
36
37- name: Add Docker GPG apt Key 31- name: Add Docker GPG apt Key
38 apt_key: 32 apt_key:
39 url: https://download.docker.com/linux/debian/gpg 33 url: https://download.docker.com/linux/debian/gpg
@@ -71,3 +65,28 @@
71 ansible.builtin.apt: 65 ansible.builtin.apt:
72 autoremove: true 66 autoremove: true
73 purge: true 67 purge: true
68
69- name: Create samba credential (used for fstab entry)
70 copy:
71 content: |
72 username={{ lookup('aws_ssm', '/jinwei-me/hetzner/username') }}
73 password={{ lookup('aws_ssm', '/jinwei-me/hetzner/password') }}
74 dest: {{ user_home }}/.credential
75 mode: 0600
76 become: true
77 become_user: admin
78
79- name: Create fstab entry for samba
80 mount:
81 state: present
82 fstype: cifs
83 opts: "credentials={{ user_home }}/.credential,file_mode=0755,dir_mode=0755,user"
84 src: "//{{ lookup('aws_ssm', '/jinwei-me/hetzner/storagebox') }}"
85 path: "{{ samba_mount_point }}"
86 become: true
87
88- name: Do the actual mount
89 shell: |
90 mount "{{ samba_mount_point }}"
91 become: true
92 become_user: admin
Powered by cgit v1.2.3 (git 2.41.0)