summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/ceph-osd
diff options
context:
space:
mode:
authorliyuenan <liyuenan@huawei.com>2016-12-27 17:44:34 +0800
committerliyuenan <liyuenan@huawei.com>2017-01-05 09:42:35 +0800
commit92f6ca7bb6d7b2f295406aab34094b1dba76ff94 (patch)
treec4e62927a3bf9862f7ba9ce286cbece2c4335ef4 /deploy/adapters/ansible/roles/ceph-osd
parent6072a49adb33f2bce3f48b9c7b8be7d96cf8501c (diff)
Yamllint test
JIRA: COMPASS-516 Change-Id: I482ce9bc86f4f963258c5b8823e0b00e83556eef Signed-off-by: liyuenan <liyuenan@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/ceph-osd')
-rw-r--r--deploy/adapters/ansible/roles/ceph-osd/tasks/install_osd.yml27
-rw-r--r--deploy/adapters/ansible/roles/ceph-osd/tasks/main.yml1
2 files changed, 22 insertions, 6 deletions
diff --git a/deploy/adapters/ansible/roles/ceph-osd/tasks/install_osd.yml b/deploy/adapters/ansible/roles/ceph-osd/tasks/install_osd.yml
index 363e5e6d..78d62f67 100644
--- a/deploy/adapters/ansible/roles/ceph-osd/tasks/install_osd.yml
+++ b/deploy/adapters/ansible/roles/ceph-osd/tasks/install_osd.yml
@@ -7,17 +7,21 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
---
-
- name: create osd lv and mount it on /var/local/osd
script: create_osd.sh
- name: fetch osd keyring from ceph_adm
- fetch: src="/var/lib/ceph/bootstrap-osd/ceph.keyring" dest="/tmp/ceph.osd.keyring" flat=yes
+ fetch:
+ src: "/var/lib/ceph/bootstrap-osd/ceph.keyring"
+ dest: "/tmp/ceph.osd.keyring"
+ flat: "yes"
delegate_to: "{{ public_vip.ip }}"
when: compute_expansion
- name: copy osd keyring
- copy: src="/tmp/ceph.osd.keyring" dest="/var/lib/ceph/bootstrap-osd/ceph.keyring"
+ copy:
+ src: "/tmp/ceph.osd.keyring"
+ dest: "/var/lib/ceph/bootstrap-osd/ceph.keyring"
- name: prepare osd disk
shell: ceph-disk prepare --fs-type xfs /var/local/osd
@@ -33,10 +37,21 @@
service: name=ceph enabled=yes
- name: rebuild osd after reboot
- lineinfile: dest=/etc/init/ceph-osd-all-starter.conf insertafter="^task" line="pre-start script\n set -e\n /opt/setup_storage/losetup.sh\n sleep 3\n mount /dev/storage-volumes/ceph0 /var/local/osd\nend script"
+ blockinfile:
+ dest: /etc/init/ceph-osd-all-starter.conf
+ insertafter: "^task"
+ block: |
+ pre-start script
+ set -e
+ /opt/setup_storage/losetup.sh
+ sleep 3
+ mount /dev/storage-volumes/ceph0 /var/local/osd
+ end script
when: ansible_os_family == "Debian"
- name: rebuild osd after reboot for centos
- lineinfile: dest=/etc/init.d/ceph insertafter="^### END INIT INFO" line="\nsleep 1\nmount /dev/storage-volumes/ceph0 /var/local/osd"
+ lineinfile:
+ dest: /etc/init.d/ceph
+ insertafter: "^### END INIT INFO"
+ line: "\nsleep 1\nmount /dev/storage-volumes/ceph0 /var/local/osd"
when: ansible_os_family == "RedHat"
-
diff --git a/deploy/adapters/ansible/roles/ceph-osd/tasks/main.yml b/deploy/adapters/ansible/roles/ceph-osd/tasks/main.yml
index b2d10b15..bc1b29b6 100644
--- a/deploy/adapters/ansible/roles/ceph-osd/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/ceph-osd/tasks/main.yml
@@ -1,3 +1,4 @@
+---
##############################################################################
# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
#