mirror of https://github.com/ceph/ceph-ansible.git
Improve YAML syntax
Improve readibility. Signed-off-by: Sébastien Han <sebastien.han@enovance.com>pull/229/head
parent
8fea199418
commit
e4a9031952
|
@ -20,10 +20,17 @@
|
|||
command: poweroff
|
||||
|
||||
- name: Wait for the server to go down
|
||||
local_action: wait_for host=<your_host> port=22 state=stopped
|
||||
local_action: >
|
||||
wait_for host=<your_host>
|
||||
port=22
|
||||
state=stopped
|
||||
|
||||
- name: Wait for the server to come up
|
||||
local_action: wait_for host=<your_host port=22 delay=10 timeout=3600
|
||||
local_action: >
|
||||
wait_for host=<your_host
|
||||
port=22
|
||||
delay=10
|
||||
timeout=3600
|
||||
|
||||
- name: Unset the noout flag
|
||||
command: ceph osd unset noout
|
||||
|
|
|
@ -29,11 +29,15 @@
|
|||
when: ceph_stable_ice
|
||||
|
||||
- name: Add Ceph stable repository
|
||||
command: "rpm -U http://ceph.com/rpm-{{ ceph_stable_release }}/{{ ceph_stable_redhat_distro }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro|replace('rhel', 'el') }}.noarch.rpm creates=/etc/yum.repos.d/ceph.repo"
|
||||
command: >
|
||||
rpm -U http://ceph.com/rpm-{{ ceph_stable_release }}/{{ ceph_stable_redhat_distro }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro|replace('rhel', 'el') }}.noarch.rpm
|
||||
creates=/etc/yum.repos.d/ceph.repo
|
||||
when: ceph_stable
|
||||
|
||||
- name: Add Ceph development repository
|
||||
command: "rpm -U http://gitbuilder.ceph.com/ceph-rpm-{{ ceph_dev_redhat_distro }}-x86_64-basic/ref/{{ ceph_dev_branch }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro }}.noarch.rpm creates=/etc/yum.repos.d/ceph.repo"
|
||||
command: >
|
||||
rpm -U http://gitbuilder.ceph.com/ceph-rpm-{{ ceph_dev_redhat_distro }}-x86_64-basic/ref/{{ ceph_dev_branch }}/noarch/ceph-release-1-0.{{ ceph_stable_redhat_distro }}.noarch.rpm
|
||||
creates=/etc/yum.repos.d/ceph.repo
|
||||
when: ceph_dev
|
||||
|
||||
- name: Add Inktank Ceph Enterprise repository
|
||||
|
|
|
@ -18,13 +18,17 @@
|
|||
register: socket
|
||||
|
||||
- name: Generate cluster UUID
|
||||
shell: uuidgen | tee fetch/ceph_cluster_uuid.conf creates=fetch/ceph_cluster_uuid.conf
|
||||
shell: >
|
||||
uuidgen | tee fetch/ceph_cluster_uuid.conf
|
||||
creates=fetch/ceph_cluster_uuid.conf
|
||||
connection: local
|
||||
sudo: false
|
||||
register: cluster_uuid
|
||||
|
||||
- name: Read cluster UUID if it already exists
|
||||
command: cat fetch/ceph_cluster_uuid.conf removes=fetch/ceph_cluster_uuid.conf
|
||||
command: >
|
||||
cat fetch/ceph_cluster_uuid.conf
|
||||
removes=fetch/ceph_cluster_uuid.conf
|
||||
connection: local
|
||||
sudo: false
|
||||
register: cluster_uuid
|
||||
|
|
|
@ -34,7 +34,9 @@
|
|||
when: ceph_stable_ice
|
||||
|
||||
- name: Extract ICE packages
|
||||
shell: "cd {{ ceph_stable_ice_temp_path }} && tar -xzf ICE-{{ ceph_stable_ice_version }}-{{ ceph_stable_ice_distro }}.tar.gz"
|
||||
shell: >
|
||||
tar -xzf ICE-{{ ceph_stable_ice_version }}-{{ ceph_stable_ice_distro }}.tar.gz
|
||||
chdir={{ ceph_stable_ice_temp_path }}
|
||||
when: ceph_stable_ice and repo_exist.stat.exists == False
|
||||
|
||||
- name: Move ICE extracted packages
|
||||
|
|
|
@ -20,7 +20,9 @@
|
|||
when: cephx
|
||||
|
||||
- name: Create MDS keyring
|
||||
command: ceph --cluster ceph --name client.bootstrap-mds --keyring /var/lib/ceph/bootstrap-mds/ceph.keyring auth get-or-create mds.{{ ansible_hostname }} osd 'allow rwx' mds 'allow' mon 'allow profile mds' -o /var/lib/ceph/mds/ceph-{{ ansible_hostname }}/keyring creates=/var/lib/ceph/mds/ceph-{{ ansible_hostname }}/keyring
|
||||
command: >
|
||||
ceph --cluster ceph --name client.bootstrap-mds --keyring /var/lib/ceph/bootstrap-mds/ceph.keyring auth get-or-create mds.{{ ansible_hostname }} osd 'allow rwx' mds 'allow' mon 'allow profile mds' -o /var/lib/ceph/mds/ceph-{{ ansible_hostname }}/keyring
|
||||
creates=/var/lib/ceph/mds/ceph-{{ ansible_hostname }}/keyring
|
||||
when: cephx
|
||||
changed_when: False
|
||||
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
wait_for: path=/etc/ceph/ceph.client.admin.keyring
|
||||
|
||||
- name: Create RGW keyring
|
||||
command: ceph auth get-or-create client.radosgw.{{ hostvars[item]['ansible_hostname'] }} osd 'allow rwx' mon 'allow rw' -o /etc/ceph/radosgw.{{ hostvars[item]['ansible_hostname'] }}.keyring creates=/etc/ceph/radosgw.{{ hostvars[item]['ansible_hostname'] }}.keyring
|
||||
command: >
|
||||
ceph auth get-or-create client.radosgw.{{ hostvars[item]['ansible_hostname'] }} osd 'allow rwx' mon 'allow rw' -o /etc/ceph/radosgw.{{ hostvars[item]['ansible_hostname'] }}.keyring
|
||||
creates=/etc/ceph/radosgw.{{ hostvars[item]['ansible_hostname'] }}.keyring
|
||||
when: cephx and radosgw
|
||||
with_items: groups.rgws
|
||||
changed_when: False
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
- name: Create monitor initial keyring
|
||||
command: "ceph-authtool /var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }} --create-keyring --name=mon. --add-key={{ monitor_secret | mandatory }} --cap mon 'allow *' creates=/var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }}"
|
||||
command: >
|
||||
ceph-authtool /var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }} --create-keyring --name=mon. --add-key={{ monitor_secret | mandatory }} --cap mon 'allow *'
|
||||
creates=/var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }}
|
||||
|
||||
- name: Set initial monitor key permissions
|
||||
file: >
|
||||
|
@ -18,7 +20,9 @@
|
|||
mode=0644
|
||||
|
||||
- name: Ceph monitor mkfs
|
||||
command: "ceph-mon --mkfs -i {{ ansible_hostname }} --fsid {{ fsid }} --keyring /var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }} creates=/var/lib/ceph/mon/ceph-{{ ansible_hostname }}/keyring"
|
||||
command: >
|
||||
ceph-mon --mkfs -i {{ ansible_hostname }} --fsid {{ fsid }} --keyring /var/lib/ceph/tmp/keyring.mon.{{ ansible_hostname }}
|
||||
creates=/var/lib/ceph/mon/ceph-{{ ansible_hostname }}/keyring
|
||||
|
||||
- name: Start and add that the monitor service to the init sequence
|
||||
service: >
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
|
||||
- name: Create OpenStack pool
|
||||
command: rados mkpool {{ item }}
|
||||
with_items:
|
||||
|
@ -10,5 +9,7 @@
|
|||
ignore_errors: True
|
||||
|
||||
- name: Create OpenStack keys
|
||||
command: ceph auth get-or-create {{ item.name }} {{ item.value }} -o /etc/ceph/ceph.{{ item.name }}.keyring creates=/etc/ceph/ceph.{{ item.name }}.keyring
|
||||
command: >
|
||||
ceph auth get-or-create {{ item.name }} {{ item.value }} -o /etc/ceph/ceph.{{ item.name }}.keyring
|
||||
creates=/etc/ceph/ceph.{{ item.name }}.keyring
|
||||
with_items: openstack_keys
|
||||
|
|
|
@ -51,8 +51,6 @@ zap_devices: false
|
|||
devices:
|
||||
- /dev/sdb
|
||||
- /dev/sdc
|
||||
- /dev/sdd
|
||||
- /dev/sde
|
||||
|
||||
# Device discovery is based on the Ansible fact 'ansible_devices'
|
||||
# which reports all the devices on a system. If chosen all the disks
|
||||
|
|
|
@ -99,7 +99,11 @@
|
|||
#
|
||||
|
||||
- name: Install default httpd.conf
|
||||
template: src=httpd.conf dest=/etc/apache2/httpd.conf owner=root group=root
|
||||
template: >
|
||||
src=httpd.conf
|
||||
dest=/etc/apache2/httpd.conf
|
||||
owner=root
|
||||
group=root
|
||||
|
||||
- name: Enable some apache mod rewrite and fastcgi
|
||||
command: "{{ item }}"
|
||||
|
|
Loading…
Reference in New Issue