#\r
#cephx: true\r
\r
+# Used for the sudo exception while starting the radosgw process\r
+# a new entry /etc/sudoers.d/ceph will be created\r
+# allowing root to not require tty\r
+#radosgw_user: root\r
+\r
# Toggle 100-continue support for Apache and FastCGI\r
# WARNING: Changing this value will cause an outage of Apache while it is reinstalled on RGW nodes\r
#http_100_continue: false\r
#\r
cephx: true\r
\r
+# Used for the sudo exception while starting the radosgw process\r
+# a new entry /etc/sudoers.d/ceph will be created\r
+# allowing root to not require tty\r
+radosgw_user: root\r
+\r
# Toggle 100-continue support for Apache and FastCGI\r
# WARNING: Changing this value will cause an outage of Apache while it is reinstalled on RGW nodes\r
http_100_continue: false\r
---
-- name: create rgw directories
+- name: create rados gateway directories
file: >
path={{ item }}
state=directory
- /var/lib/ceph/bootstrap-rgw
- /var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}
-- name: copy rgw bootstrap key
+- name: copy rados gateway bootstrap key
copy: >
src=fetch/{{ fsid }}/var/lib/ceph/bootstrap-rgw/ceph.keyring
dest=/var/lib/ceph/bootstrap-rgw/ceph.keyring
mode=600
when: cephx
-- name: create rgw keyring
+- name: create rados gateway keyring
command: >
ceph --cluster ceph --name client.bootstrap-rgw --keyring /var/lib/ceph/bootstrap-rgw/ceph.keyring auth get-or-create client.rgw.{{ ansible_hostname }} osd 'allow rwx' mon 'allow rw' -o /var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/keyring
creates=/var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/keyring
changed_when: false
when: cephx
-- name: set rgw key permissions
+- name: set rados gateway key permissions
file: >
path=/var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/keyring
mode=0600
group=root
when: cephx
-- name: activate rgw with upstart
+- name: activate rados gateway with upstart
file: >
path=/var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/{{ item }}
state=touch
changed_when: false
when: ansible_distribution == "Ubuntu"
-- name: activate rgw with sysvinit
+- name: activate rados gateway with sysvinit
file: >
path=/var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/{{ item }}
state=touch
changed_when: false
when: ansible_distribution != "Ubuntu"
+- name: generate rados gateway sudoers file
+ template: >
+ src=ceph.j2
+ dest=/etc/sudoers.d/ceph
+ owner=root
+ group=root
+ mode=0400
+ when: ansible_distribution != "Ubuntu"
ansible_distribution != "Ubuntu" and
ansible_os_family != 'RedHat'
-- name: start rgw
+- name: start rgw on ubuntu
service: >
name=radosgw-all
state=started
- when: ansible_distribution == "Ubuntu"
-
-- name: activate rgw service
- command: systemctl enable ceph-radosgw.service
- when: ansible_os_family == 'RedHat'
+ when: ansible_distribution == 'Ubuntu'
-- name: start rgw
+- name: start rgw on red hat
service: >
name=ceph-radosgw
state=started
enabled=yes
- when: ansible_os_family == 'RedHat'
+ when: ansible_distribution == 'RedHat'