TripleO Ansible project repository. Contains playbooks for use with TripleO OpenStack deployments.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

94 lines
2.6 KiB

---
# Copyright 2021 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
- name: dbus related tasks
block:
- name: create dbus service file
copy:
content: "{{ dbus_ganesha_file.stdout }}"
dest: /etc/dbus-1/system.d/org.ganesha.nfsd.conf
owner: "root"
group: "root"
mode: "0644"
- name: reload dbus configuration
command: "killall -SIGHUP dbus-daemon"
when: tripleo_cephadm_ceph_nfs_dynamic_exports | bool
delegate_to: "{{ nfs_node }}"
- name: Render config files
delegate_to: "{{ nfs_node }}"
block:
- name: Make sure /etc/ganesha exists
file:
path: /etc/ganesha
state: directory
owner: root
group: root
mode: "0755"
- name: create exports directory
file:
path: /etc/ganesha/export.d
state: directory
owner: "root"
group: "root"
mode: "0755"
when: tripleo_cephadm_ceph_nfs_dynamic_exports | bool
- name: create exports dir index file
copy:
content: ""
force: false
dest: /etc/ganesha/export.d/INDEX.conf
owner: "root"
group: "root"
mode: "0644"
when: tripleo_cephadm_ceph_nfs_dynamic_exports | bool
- name: Render ganesha config file
template:
src: ganesha.conf.j2
dest: /etc/ganesha/ganesha.conf
become: true
- name: Render ganesha systemd unit
template:
src: ceph-nfs.service.j2
dest: /etc/systemd/system/ceph-nfs@.service
owner: "root"
group: "root"
mode: "0644"
become: true
- name: systemd start nfs container
systemd:
name: ceph-nfs@{{ tripleo_cephadm_ceph_nfs_service_suffix | default(ansible_facts['hostname']) }}
state: started
enabled: yes
masked: no
daemon_reload: yes
when:
- tripleo_cephadm_ceph_nfs_enable_service | bool
- name: start nfs gateway service
systemd:
name: nfs-ganesha
state: started
enabled: yes
masked: no
when:
- tripleo_cephadm_ceph_nfs_enable_service | bool