2016-05-06 02:20:03 +08:00
|
|
|
---
|
|
|
|
- name: create ganesha conf directory
|
|
|
|
file:
|
|
|
|
path: /etc/ganesha
|
|
|
|
state: directory
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
|
2016-07-21 21:17:19 +08:00
|
|
|
- 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
|
2016-08-26 08:37:57 +08:00
|
|
|
hostname: "{{ ansible_hostname }}"
|
2016-07-21 21:17:19 +08:00
|
|
|
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"
|
2016-08-18 20:24:48 +08:00
|
|
|
when: nfs_obj_gw
|
2016-07-21 21:17:19 +08:00
|
|
|
|
|
|
|
- name: get user create output
|
|
|
|
command: docker logs ceph-{{ ansible_hostname }}-rgw-user
|
2016-11-27 04:31:56 +08:00
|
|
|
always_run: true
|
2016-07-21 21:17:19 +08:00
|
|
|
register: rgwuser
|
|
|
|
|
2016-05-06 02:20:03 +08:00
|
|
|
- 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
|