Skip to content

Commit

Permalink
Mount backend filesystems in client machines
Browse files Browse the repository at this point in the history
Signed-off-by: Xavi Hernandez <[email protected]>
  • Loading branch information
xhernandez committed Jan 16, 2024
1 parent d886fd5 commit 0a51d8e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions playbooks/ansible/roles/client.prep/tasks/centos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- python3-pytest
- podman
- tox
- sshfs
state: latest

- name: Install Python 3 modules
Expand Down
13 changes: 13 additions & 0 deletions playbooks/ansible/roles/client.prep/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@
- debug:
msg: "{{ ctdb_network_public_interfaces }}"

- name: Create backend mount points
file:
path: "{{ config.paths.mount }}/backends/{{ item.share_name }}-{{ config.be.name }}-{{ config.be.variant }}"
state: directory
with_items: "{{ samba_shares }}"

- name: Make the backend filesystems accessible from the client
command: >-
sshfs -o reconnect
root@{{ config.groups['cluster'][0] }}:{{ config.paths.mount }}/{{ item.cluster_volume }}
{{ config.paths.mount }}/backends/{{ item.share_name }}-{{ config.be.name }}-{{ config.be.variant }}
with_items: "{{ samba_shares }}"

- name: Create a README file
template:
src: README.j2
Expand Down

0 comments on commit 0a51d8e

Please sign in to comment.