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