]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Improve YAML syntax 229/head
authorSébastien Han <sebastien.han@enovance.com>
Thu, 19 Mar 2015 11:21:29 +0000 (12:21 +0100)
committerSébastien Han <sebastien.han@enovance.com>
Thu, 19 Mar 2015 11:23:12 +0000 (12:23 +0100)
Improve readibility.

Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
maintenance.yml
roles/ceph-common/tasks/install_on_redhat.yml
roles/ceph-common/tasks/main.yml
roles/ceph-common/tasks/prerequisite_ice.yml
roles/ceph-mds/tasks/pre_requisite.yml
roles/ceph-mon/tasks/ceph_keys.yml
roles/ceph-mon/tasks/deploy_monitors.yml
roles/ceph-mon/tasks/openstack_config.yml
roles/ceph-osd/defaults/main.yml
roles/ceph-radosgw/tasks/install_debian.yml

index 9b115d11686777c986403eaa95e787cf97a24a2e..3b7d2a9c6cac3df73acac87400eb184526adfc83 100644 (file)
     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
index 85325c442ce127b298b45ab02d29f96176b2222f..a0c1c66dec6ed1695f541811fc827222dc4f4eff 100644 (file)
   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
index 96a9b5f7fe7836511d98c35b6d7bdab3d9cc35bb..aff3da4ac65eba5338fc756366c599f3dac012a4 100644 (file)
   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
index 68066506040dd8fdaf26c53d7a27ba386911cb22..da530f3e982e31a9fce8fe74cd3abdab61a8ddc6 100644 (file)
@@ -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
index bc83aede1e29c2c9394ed438454c4b215549dd67..0bd1ffee3351433e2592c5dec31894216e1bb51e 100644 (file)
@@ -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
 
index fda56a5292f91022b3c2b8a2319a6924cb290d8b..73761a2c2881af20a4cee4b3f5ae81dc9d2c2b57 100644 (file)
@@ -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
index 3721f16b9eeba448370203a82ac58a1af0abf58b..6f8fcfc07df18264e5d1b0e68b64d5d18a0ffb12 100644 (file)
@@ -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: >
index 8d8566bc3b9ddcc495edbd7e07227ecf7d82e96a..870c17a8b2bf6b4757bcc68c316eb3be90923d82 100644 (file)
@@ -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
index 5f767c2a1ad80f5c8d5b973855fa4390ac35c249..f18ed49bb064ee443a483611c9e47c24173707d8 100644 (file)
@@ -51,8 +51,6 @@ zap_devices: false
 devices:\r
   - /dev/sdb\r
   - /dev/sdc\r
-  - /dev/sdd\r
-  - /dev/sde\r
 \r
 # Device discovery is based on the Ansible fact 'ansible_devices'\r
 # which reports all the devices on a system. If chosen all the disks\r
index e8c0b3f6f484644b5c63da3eb90a319a77d87392..16f95d803a7912432b5e7be268dad86ca18ef5ec 100644 (file)
 #
 
 - 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 }}"