refactor: standardize YAML formatting and improve readability in Ansible tasks
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
---
|
||||
- name: Check if JuiceFS is already installed
|
||||
ansible.builtin.command: which juicefs
|
||||
register: juicefs_check
|
||||
@@ -7,7 +8,7 @@
|
||||
- name: Install JuiceFS using the automatic installer
|
||||
ansible.builtin.shell: curl -sSL https://d.juicefs.com/install | sh -
|
||||
args:
|
||||
warn: false # Suppress warnings about using shell/curl
|
||||
warn: false # Suppress warnings about using shell/curl
|
||||
register: juicefs_installation
|
||||
when: juicefs_check.rc != 0
|
||||
become: true
|
||||
@@ -22,20 +23,21 @@
|
||||
ansible.builtin.file:
|
||||
path: /mnt/object_storage
|
||||
state: directory
|
||||
mode: '0755'
|
||||
mode: "0755"
|
||||
become: true
|
||||
|
||||
- name: Create cache directory
|
||||
ansible.builtin.file:
|
||||
path: /var/jfsCache
|
||||
state: directory
|
||||
mode: '0755'
|
||||
mode: "0755"
|
||||
become: true
|
||||
|
||||
- name: Set JuiceFS facts
|
||||
ansible.builtin.set_fact:
|
||||
hetzner_access_key: "{{ lookup('community.general.onepassword', 'mfk2qgnaplgtk6xmfc3r6w6neq', vault='j7nmhqlsjmp2r6umly5t75hzb4', field='AWS_ACCESS_KEY_ID') }}"
|
||||
hetzner_secret_key: "{{ lookup('community.general.onepassword', 'mfk2qgnaplgtk6xmfc3r6w6neq', vault='j7nmhqlsjmp2r6umly5t75hzb4', field='AWS_SECRET_ACCESS_KEY') }}"
|
||||
hetzner_secret_key: "{{ lookup('community.general.onepassword', 'mfk2qgnaplgtk6xmfc3r6w6neq', vault='j7nmhqlsjmp2r6umly5t75hzb4', field='AWS_SECRET_ACCESS_KEY')
|
||||
}}"
|
||||
redis_password: "{{ lookup('community.general.onepassword', '4cioblm633bdkl6put35lk6ql4', vault='j7nmhqlsjmp2r6umly5t75hzb4', field='password') }}"
|
||||
|
||||
- name: Include JuiceFS Redis tasks
|
||||
@@ -47,7 +49,7 @@
|
||||
dest: /etc/systemd/system/juicefs.service
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
mode: "0644"
|
||||
become: true
|
||||
|
||||
- name: Reload systemd daemon
|
||||
|
||||
Reference in New Issue
Block a user