Skip to content

Commit

Permalink
OPSEXP-2955 Avoid resetting permissions on mounted shared content sto…
Browse files Browse the repository at this point in the history
…rage (#1018)
  • Loading branch information
gionn authored Jan 9, 2025
1 parent 3bf892c commit f8e7447
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions roles/repository/tasks/sharedcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,31 @@
- name: Shared contentstore preparation
become: true
when: cs_storage.device is defined
vars:
cs_storage_data_folder: "{{ content_data_folder }}/content"
block:
- name: Check if contentstore folder exists
ansible.builtin.stat:
path: "{{ cs_storage_data_folder }}"
register: contentstore_folder

- name: Create contentstore folders
ansible.builtin.file:
path: "{{ content_data_folder }}/content"
path: "{{ cs_storage_data_folder }}"
state: directory
owner: root
group: root
mode: "0755"
tags:
- molecule-idempotence-notest
when: not contentstore_folder.stat.exists

- name: Mount ACS ContentStore
vars:
mnt_options:
- "{{ cs_storage.options | default('defaults') }}"
- _netdev
ansible.posix.mount:
state: mounted
path: "{{ content_data_folder }}/content"
path: "{{ cs_storage_data_folder }}"
src: "{{ cs_storage.device }}"
fstype: "{{ cs_storage.type }}"
opts: "{{ mnt_options | join(',') }}"

0 comments on commit f8e7447

Please sign in to comment.