ceph-ansible/roles/ceph-radosgw/tasks/install_redhat.yml

72 lines
1.4 KiB
YAML
Raw Normal View History

---
## Deploy RADOS Gateway
#
- name: Add Ceph extra
2014-09-05 03:14:11 +08:00
template: >
src=ceph-extra.repo
dest=/etc/yum.repos.d
owner=root
2014-09-05 03:14:11 +08:00
group=root
- name: Add special fastcgi repository key
rpm_key: key=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
- name: Add special fastcgi repository
command: rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
2014-09-05 03:14:11 +08:00
- name: "Install Apache, fastcgi, and Rados Gateway"
yum: >
name={{ item }}
state=present
with_items:
- httpd
- mod_fastcgi
- mod_fcgid
- ceph-radosgw
## Prepare Apache
#
- name: Install Rados Gateway vhost
2014-09-05 03:14:11 +08:00
template: >
src=rgw.conf
dest=/etc/httpd/conf.d/rgw.conf
owner=root
group=root
## Prepare RGW
#
- name: Create RGW directory
2014-09-05 03:14:11 +08:00
file: >
path=/var/lib/ceph/radosgw/{{ ansible_fqdn }}
state=directory
owner=root
group=root
mode=0644
- name: Install s3gw.fcgi script
2014-09-05 03:14:11 +08:00
copy: >
src=s3gw.fcgi
dest=/var/www/s3gw.fcgi
mode=0555
owner=root
group=root
- name: Disable default site
shell: sed -i "s/^[^+#]/#/g" /etc/httpd/conf.d/welcome.conf
changed_when: False
notify:
- restart apache2
## If we don't perform this check Ansible will start multiple instance of radosgw
- name: Check if RGW is started
command: /etc/init.d/ceph-radosgw status
register: rgwstatus
ignore_errors: True
- name: Start RGW
command: /etc/init.d/ceph-radosgw start
when: rgwstatus.rc != 0