ceph-ansible/roles/ceph-nfs/tasks/docker/create_configs.yml

36 lines
1.2 KiB
YAML
Raw Normal View History

---
- name: create ganesha conf directory
file:
path: /etc/ganesha
state: directory
owner: root
group: root
mode: 0644
- name: create the nfs rgw user
docker:
image: "{{ ceph_rgw_docker_username }}/{{ ceph_rgw_docker_imagename }}:{{ ceph_rgw_docker_image_tag }}"
name: ceph-{{ ansible_hostname }}-rgw-user
hostname: "{{ ansible_hostname }}"
expose: "{{ ceph_rgw_civetweb_port }}"
ports: "{{ ceph_rgw_civetweb_port }}:{{ ceph_rgw_civetweb_port }}"
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: nfs_obj_gw
- name: get user create output
command: docker logs ceph-{{ ansible_hostname }}-rgw-user
register: rgwuser
- name: generate ganesha configuration file
action: config_template
args:
src: "{{ playbook_dir }}/roles/ceph-common/templates/ganesha.conf.j2"
dest: /etc/ganesha/ganesha.conf
owner: "root"
group: "root"
mode: "0644"
config_overrides: "{{ ganesha_conf_overrides }}"
config_type: ini