#ceph_rbd_mirror_docker_image_tag: latest
#ceph_docker_on_openstack: false
+#######
+# NFS #
+#######
+#nfs_containerized_deployment: true
+#nfs_containerized_deployment_with_kv: false
+#ceph_nfs_docker_username: ceph
+#ceph_nfs_docker_imagename: daemon
+#ceph_nfs_docker_image_tag: latest
+#ceph_nfs_docker_extra_env: "GANESHA_EPOCH={{ ganesha_epoch }}" # comma separated variables
+#nfs_file_gw: false
+#nfs_obj_gw: false
+#ceph_nfs_rgw_access_key: "QFAMEDSJP5DEKJO0DDXY"
+#ceph_nfs_rgw_secret_key: "iaSFLDVvDdQt6lkNzHyW4fPLZugBAI1g17LO0+87[MAC[M#C"
## Configure package origin
#
-#ceph_origin: 'upstream' #'distro' or 'local'
+#ceph_origin: 'upstream' # or 'distro' or 'local'
# 'distro' means that no separate repo file will be added
# you will get whatever version of Ceph is included in your Linux distro.
# 'local' means that the ceph binaries will be copied over from the local machine
#osd_auto_discovery: False
+# Confiure the type of NFS gatway access. At least one must be enabled for an
+# NFS role to be useful
+#
+# Set this to true to enable File access via NFS. Requires an MDS role.
+#nfs_file_gw: true
+# Set this to true to enable Object access via NFS. Requires an RGW role.
+#nfs_obj_gw: false
+
#######################
# Access type options #
#######################
+# These are currently in ceph-common defaults because nfs_obj_gw shared with ceph-rgw
# Enable NFS File access
-#fsal_ceph: true
-
+#nfs_file_gw: true
# Enable NFS Object access
-#fsal_rgw: false
+#nfs_obj_gw: false
######################
# NFS Ganesha Config #
######################
#ceph_nfs_export_id: 20134
-#ceph_nfs_pseudo_path: "/ceph"
+#ceph_nfs_pseudo_path: "/cephfile"
#ceph_nfs_protocols: "3,4"
#ceph_nfs_access_type: "RW"
#ceph_nfs_log_file: "/var/log/ganesha.log"
# FSAL Ceph Config #
####################
#ceph_nfs_ceph_export_id: 20134
-#ceph_nfs_ceph_pseudo_path: "/ceph"
+#ceph_nfs_ceph_pseudo_path: "/cephobject"
#ceph_nfs_ceph_protocols: "3,4"
#ceph_nfs_ceph_access_type: "RW"
dmcrypt_dedicated_journal: False
osd_auto_discovery: False
+
+# Confiure the type of NFS gatway access. At least one must be enabled for an
+# NFS role to be useful
+#
+# Set this to true to enable File access via NFS. Requires an MDS role.
+nfs_file_gw: true
+# Set this to true to enable Object access via NFS. Requires an RGW role.
+nfs_obj_gw: false
when:
- nfs_group_name in group_names
- ansible_pkg_mgr == "yum"
- - fsal_ceph
+ - nfs_file_gw
- name: install nfs ceph gateway
dnf:
when:
- nfs_group_name in group_names
- ansible_pkg_mgr == "dnf"
- - fsal_ceph
+ - nfs_file_gw
- name: install nfs rgw gateway
yum:
when:
- nfs_group_name in group_names
- ansible_pkg_mgr == "yum"
- - fsal_rgw
+ - nfs_obj_gw
- name: install nfs rgw gateway
dnf:
when:
- nfs_group_name in group_names
- ansible_pkg_mgr == "dnf"
- - fsal_rgw
+ - nfs_obj_gw
#jinja2: trim_blocks: "true", lstrip_blocks: "true"
# {{ ansible_managed }}
-{% if fsal_ceph %}
+{% if nfs_file_gw %}
EXPORT
{
Export_ID={{ ceph_nfs_ceph_export_id }};
}
}
{% endif %}
-{% if fsal_rgw %}
+{% if nfs_obj_gw %}
EXPORT
{
Export_ID={{ ceph_nfs_rgw_export_id }};
#######################
# Access type options #
#######################
+# These are currently in ceph-common defaults because nfs_obj_gw shared with ceph-rgw
# Enable NFS File access
-fsal_ceph: true
-
+#nfs_file_gw: true
# Enable NFS Object access
-fsal_rgw: false
+#nfs_obj_gw: false
######################
# NFS Ganesha Config #
######################
ceph_nfs_export_id: 20134
-ceph_nfs_pseudo_path: "/ceph"
+ceph_nfs_pseudo_path: "/cephfile"
ceph_nfs_protocols: "3,4"
ceph_nfs_access_type: "RW"
ceph_nfs_log_file: "/var/log/ganesha.log"
# FSAL Ceph Config #
####################
ceph_nfs_ceph_export_id: 20134
-ceph_nfs_ceph_pseudo_path: "/ceph"
+ceph_nfs_ceph_pseudo_path: "/cephobject"
ceph_nfs_ceph_protocols: "3,4"
ceph_nfs_ceph_access_type: "RW"
state: running
env: "CEPH_DAEMON=RGW_USER,RGW_USERNAME={{ ceph_nfs_rgw_user }},RGW_USER_ACCESS_KEY={{ ceph_nfs_rgw_access_key }},RGW_USER_SECRET_KEY={{ ceph_nfs_rgw_secret_key }}"
volumes: "/var/lib/ceph:/var/lib/ceph,/etc/ceph:/etc/ceph"
- when: fsal_rgw
+ when: nfs_obj_gw
- name: get user create output
command: docker logs ceph-{{ ansible_hostname }}-rgw-user
- name: create rgw nfs user
command: radosgw-admin user create --uid={{ ceph_nfs_rgw_user }} --display-name="RGW NFS User"
register: rgwuser
- when: fsal_rgw
+ when: nfs_obj_gw
- name: set access key
set_fact:
ceph_nfs_rgw_access_key: "{{ (rgwuser.stdout | from_json)['keys'][0]['access_key'] }}"
- when: fsal_rgw
+ when: nfs_obj_gw
- name: set secret key
set_fact:
ceph_nfs_rgw_secret_key: "{{(rgwuser.stdout | from_json)['keys'][0]['secret_key']}}"
- when: fsal_rgw
+ when: nfs_obj_gw
- name: generate ganesha configuration file
action: config_template
set_fact:
rgw_config_keys:
- "/var/lib/ceph/radosgw/{{ ansible_hostname }}/keyring"
- when: fsal_rgw
+ when: nfs_obj_gw
- name: wait for rgw keyring
wait_for: path="/var/lib/ceph/radosgw/{{ ansible_hostname }}/keyring"
when:
- - fsal_rgw
+ - nfs_obj_gw
- inventory_hostname == groups.rgws[0]
- name: stat for config and keys
failed_when: false
register: statconfig
when:
- - fsal_rgw
+ - nfs_obj_gw
- inventory_hostname == groups.rgws[0]
- name: push ceph files to the ansible server
- statconfig.results
when:
- item.1.stat.exists == false
- - fsal_rgw
+ - nfs_obj_gw
- inventory_hostname == groups.rgws[0]