Add support for glusterfs mounts

Change-Id: I2631e6f00011942954be7c776e3c99a11bdfb28d
This commit is contained in:
Jonathan Rosser 2022-04-13 17:45:42 +01:00
parent c3d4f26ed1
commit 11c23a5232
5 changed files with 30 additions and 0 deletions

View File

@ -65,5 +65,8 @@ systemd_default_mount_options: 'defaults'
# type: "fuse.s3fs"
# options: "url=https://s3-{{aws_region}}.amazonaws.com,_netdev,allow_other,use_path_request_style"
# credentials: "ACCESS_KEY_ID:SECRET_ACCESS_KEY"
# - what: gluster-server:gluster-volume-name
# where: /mnt/shared_storage
# type: gkusterfs
systemd_mounts: []

View File

@ -50,3 +50,20 @@
package:
name: "{{ systemd_mount_packages }}"
state: present
- name: Configure fuse for glusterfs
when:
- "'glusterfs' in systemd_mount_types"
block:
- name: Configure systemd-tmpfiles to create /dev/fuse at boot
copy:
content: "c /dev/fuse 0600 - - - 10:229"
dest: "/etc/tmpfiles.d/openstack-ansible-systemd_mount-glusterfs-client.conf"
register: _glusterfs_server_tmpfiles
- name: Restart systemd-tmpfiles-setup-dev
service:
name: "systemd-tmpfiles-setup-dev"
state: restarted
when:
- _glusterfs_server_tmpfiles is changed

View File

@ -6,3 +6,6 @@ systemd_ceph_packages:
systemd_s3_packages:
- s3fs
systemd_glusterfs_packages:
- glusterfs-client

View File

@ -34,4 +34,7 @@ systemd_mount_packages: |-
{% if 'fuse.s3fs' in mount_types %}
{% set _ = packages.extend(systemd_s3_packages) %}
{% endif %}
{% if 'glusterfs' in mount_types %}
{% set _ = packages.extend(systemd_glusterfs_packages) %}
{% endif %}
{{ packages }}

View File

@ -6,3 +6,7 @@ systemd_ceph_packages:
systemd_s3_packages:
- s3fs-fuse
systemd_glusterfs_packages:
- glusterfs
- glusterfs-fuse