]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Activate rgws on rhel7
authorleseb <seb@redhat.com>
Tue, 7 Jul 2015 11:48:37 +0000 (13:48 +0200)
committerleseb <seb@redhat.com>
Tue, 7 Jul 2015 15:41:28 +0000 (17:41 +0200)
Signed-off-by: leseb <seb@redhat.com>
group_vars/rgws
roles/ceph-radosgw/defaults/main.yml
roles/ceph-radosgw/tasks/pre_requisite.yml
roles/ceph-radosgw/tasks/start_radosgw.yml
roles/ceph-radosgw/templates/ceph.j2 [new file with mode: 0644]

index 9e085b5315753603349e4e0b9b6b27a7266472d6..9f6c9a616723dad552239d7537115b46eacf3f9e 100644 (file)
@@ -5,6 +5,11 @@ dummy:
 #\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
index 0db6f633cdfaefe6b852c9da987a6fecb9f9ec47..6bb65fe4f8df0383de4e9fb1012bf324ab355e2b 100644 (file)
@@ -5,6 +5,11 @@
 #\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
index fec0ed0f2f7e4465d60ae2feb2de727f3aaf78f1..7710546b318ce12a06bc51da50a2e8bdc6dfd1c1 100644 (file)
@@ -1,5 +1,5 @@
 ---
-- name: create rgw directories
+- name: create rados gateway directories
   file: >
     path={{ item }}
     state=directory
@@ -10,7 +10,7 @@
     - /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
@@ -34,7 +34,7 @@
     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
@@ -47,7 +47,7 @@
   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"
index 4781d5abf7287d4a81b11bc1fa4280dbbf1c3eb1..b9c34cc1bc9e1eb21992c9637b455e44f9abff68 100644 (file)
     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'
diff --git a/roles/ceph-radosgw/templates/ceph.j2 b/roles/ceph-radosgw/templates/ceph.j2
new file mode 100644 (file)
index 0000000..d0d31dc
--- /dev/null
@@ -0,0 +1,2 @@
+# {{ ansible_managed }}
+Defaults:{{ radosgw_user }} !requiretty