mirror of https://github.com/ceph/ceph-ansible.git
commit
324a4745fc
|
@ -14,12 +14,12 @@
|
|||
register: statconfig
|
||||
|
||||
- name: try to fetch ceph config and keys
|
||||
copy: >
|
||||
src={{ fetch_directory }}/docker_mon_files/{{ item.0 }}
|
||||
dest={{ item.0 }}
|
||||
owner=root
|
||||
group=root
|
||||
mode=644
|
||||
copy:
|
||||
src: "{{ fetch_directory }}/docker_mon_files/{{ item.0 }}"
|
||||
dest: "{{ item.0 }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 644
|
||||
changed_when: false
|
||||
with_together:
|
||||
- ceph_config_keys
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
---
|
||||
- name: create rgw bootstrap directory
|
||||
file: >
|
||||
path=/var/lib/ceph/bootstrap-rgw
|
||||
state=directory
|
||||
file:
|
||||
path: /var/lib/ceph/bootstrap-rgw
|
||||
state: directory
|
||||
|
||||
# NOTE (leseb): for version 1.1.0 because https://github.com/ansible/ansible-modules-core/issues/1227
|
||||
- name: install docker-py
|
||||
pip: >
|
||||
name=docker-py
|
||||
version=1.1.0
|
||||
pip:
|
||||
name: docker-py
|
||||
version: 1.1.0
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
---
|
||||
- name: run the rados gateway docker image
|
||||
docker: >
|
||||
image="{{ ceph_rgw_docker_username }}/{{ ceph_rgw_docker_imagename }}"
|
||||
name=ceph-{{ ansible_hostname }}-rgw
|
||||
expose={{ ceph_rgw_civetweb_port }}
|
||||
ports="{{ ceph_rgw_civetweb_port }}:{{ ceph_rgw_civetweb_port }}"
|
||||
state=running
|
||||
env="CEPH_DAEMON=RGW,{{ ceph_rgw_docker_extra_env }}"
|
||||
volumes="/var/lib/ceph:/var/lib/ceph,/etc/ceph:/etc/ceph"
|
||||
docker:
|
||||
image: "{{ ceph_rgw_docker_username }}/{{ ceph_rgw_docker_imagename }}"
|
||||
name: ceph-{{ ansible_hostname }}-rgw
|
||||
expose=: "{{ ceph_rgw_civetweb_port }}"
|
||||
ports: "{{ ceph_rgw_civetweb_port }}:{{ ceph_rgw_civetweb_port }}"
|
||||
state: running
|
||||
env=: "CEPH_DAEMON=RGW,{{ ceph_rgw_docker_extra_env }}"
|
||||
volumes: "/var/lib/ceph:/var/lib/ceph,/etc/ceph:/etc/ceph"
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
---
|
||||
- name: create nss directory for keystone certificates
|
||||
file: >
|
||||
path={{ radosgw_nss_db_path }}
|
||||
state=directory
|
||||
owner=root
|
||||
group=root
|
||||
mode=0644
|
||||
file:
|
||||
path: "{{ radosgw_nss_db_path }}"
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
|
||||
- name: create nss entries for keystone certificates
|
||||
shell: "{{ item }}"
|
||||
|
|
|
@ -1,46 +1,46 @@
|
|||
---
|
||||
- name: create rados gateway directories
|
||||
file: >
|
||||
path={{ item }}
|
||||
state=directory
|
||||
owner=root
|
||||
group=root
|
||||
mode=0644
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
with_items:
|
||||
- /var/lib/ceph/bootstrap-rgw
|
||||
- /var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}
|
||||
|
||||
- name: copy rados gateway bootstrap key
|
||||
copy: >
|
||||
src={{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-rgw/ceph.keyring
|
||||
dest=/var/lib/ceph/bootstrap-rgw/ceph.keyring
|
||||
owner=root
|
||||
group=root
|
||||
mode=600
|
||||
copy:
|
||||
src: "{{ fetch_directory }}/{{ fsid }}/var/lib/ceph/bootstrap-rgw/ceph.keyring"
|
||||
dest: /var/lib/ceph/bootstrap-rgw/ceph.keyring
|
||||
owner: root
|
||||
group: root
|
||||
mode: 600
|
||||
when: cephx
|
||||
|
||||
- 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
|
||||
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
|
||||
args:
|
||||
creates: /var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/keyring
|
||||
changed_when: false
|
||||
when: cephx
|
||||
|
||||
- name: set rados gateway key permissions
|
||||
file: >
|
||||
path=/var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/keyring
|
||||
mode=0600
|
||||
owner=root
|
||||
group=root
|
||||
file:
|
||||
path: /var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/keyring
|
||||
mode: 0600
|
||||
owner: root
|
||||
group: root
|
||||
when: cephx
|
||||
|
||||
- name: activate rados gateway with upstart
|
||||
file: >
|
||||
path=/var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/{{ item }}
|
||||
state=touch
|
||||
owner=root
|
||||
group=root
|
||||
mode=0644
|
||||
file:
|
||||
path: /var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/{{ item }}
|
||||
state: touch
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
with_items:
|
||||
- done
|
||||
- upstart
|
||||
|
@ -48,12 +48,12 @@
|
|||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- name: activate rados gateway with sysvinit
|
||||
file: >
|
||||
path=/var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/{{ item }}
|
||||
state=touch
|
||||
owner=root
|
||||
group=root
|
||||
mode=0644
|
||||
file:
|
||||
path: /var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/{{ item }}
|
||||
state: touch
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
with_items:
|
||||
- done
|
||||
- sysvinit
|
||||
|
@ -61,10 +61,10 @@
|
|||
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
|
||||
template:
|
||||
src: ceph.j2
|
||||
dest: /etc/sudoers.d/ceph
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0400
|
||||
when: ansible_distribution != "Ubuntu"
|
||||
|
|
|
@ -18,15 +18,15 @@
|
|||
when: ansible_distribution == 'Ubuntu'
|
||||
|
||||
- name: start rgw on ubuntu
|
||||
service: >
|
||||
name=radosgw
|
||||
args=id=rgw.{{ ansible_hostname }}
|
||||
state=started
|
||||
service:
|
||||
name: radosgw
|
||||
args: id=rgw.{{ ansible_hostname }}
|
||||
state: started
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
|
||||
- name: start rgw on red hat
|
||||
service: >
|
||||
name=ceph-radosgw
|
||||
state=started
|
||||
enabled=yes
|
||||
service:
|
||||
name: ceph-radosgw
|
||||
state: started
|
||||
enabled: yes
|
||||
when: ansible_distribution == 'RedHat'
|
||||
|
|
Loading…
Reference in New Issue