diff --git a/modules/scripts/startup-script/files/setup-raid.yml b/modules/scripts/startup-script/files/setup-raid.yml index 356a67436c..0f3d81ec4f 100644 --- a/modules/scripts/startup-script/files/setup-raid.yml +++ b/modules/scripts/startup-script/files/setup-raid.yml @@ -21,13 +21,8 @@ DST_MNT: "/mnt/localssd" bashrc: "{{ '/etc/bashrc' if ansible_facts['os_family'] == 'RedHat' else '/etc/bash.bashrc' }}" array_dev: "/dev/md0" - mode: 755 + mode: '0755' tasks: - - name: Check if DST_MNT exists - ansible.builtin.stat: - path: "{{ DST_MNT }}" - register: dst_mnt_exists - - name: Check if {{ array_dev }} exists ansible.builtin.stat: path: "{{ array_dev }}" @@ -78,15 +73,6 @@ ansible.builtin.shell: cmd: tune2fs /dev/md0 -r 131072 - - name: Add a label - ansible.builtin.shell: e2label /dev/md0 LOCALSSD - - - name: Create mount point - ansible.builtin.file: - path: "{{ DST_MNT }}" - state: directory - mode: "{{ mode }}" - - name: Mount RAID array ansible.posix.mount: src: /dev/md0 @@ -94,3 +80,9 @@ fstype: ext4 opts: discard,defaults,nofail state: mounted + + - name: Set mount permissions + ansible.builtin.file: + path: "{{ DST_MNT }}" + state: directory + mode: "{{ mode }}"