summaryrefslogtreecommitdiffstats
path: root/ci/ansible/roles
diff options
context:
space:
mode:
Diffstat (limited to 'ci/ansible/roles')
-rw-r--r--ci/ansible/roles/cleaner/tasks/main.yml17
-rw-r--r--ci/ansible/roles/common/tasks/main.yml4
-rw-r--r--ci/ansible/roles/osdsdb/scenarios/etcd.yml6
-rw-r--r--ci/ansible/roles/osdsdock/scenarios/ceph.yml18
-rw-r--r--ci/ansible/roles/osdsdock/scenarios/cinder_standalone.yml2
5 files changed, 26 insertions, 21 deletions
diff --git a/ci/ansible/roles/cleaner/tasks/main.yml b/ci/ansible/roles/cleaner/tasks/main.yml
index 93aeb59..334d5bb 100644
--- a/ci/ansible/roles/cleaner/tasks/main.yml
+++ b/ci/ansible/roles/cleaner/tasks/main.yml
@@ -1,4 +1,11 @@
---
+- name: remove golang tarball
+ file:
+ path: "/opt/{{ golang_tarball }}"
+ state: absent
+ force: yes
+ ignore_errors: yes
+
- name: kill etcd daemon service
shell: killall etcd
ignore_errors: yes
@@ -14,7 +21,7 @@
- name: remove etcd tarball
file:
- path: "/tmp/{{ etcd_tarball }}"
+ path: "/opt/{{ etcd_tarball }}"
state: absent
force: yes
ignore_errors: yes
@@ -29,11 +36,9 @@
ignore_errors: yes
- name: clean all opensds build files
- file:
- path: "{{ opensds_build_dir }}"
- state: absent
- force: yes
- ignore_errors: yes
+ shell: . /etc/profile; make clean
+ args:
+ chdir: "{{ opensds_root_dir }}"
- name: clean all opensds configuration files
file:
diff --git a/ci/ansible/roles/common/tasks/main.yml b/ci/ansible/roles/common/tasks/main.yml
index 20f5381..7c9a49a 100644
--- a/ci/ansible/roles/common/tasks/main.yml
+++ b/ci/ansible/roles/common/tasks/main.yml
@@ -13,8 +13,8 @@
set -e
set -x
- wget https://storage.googleapis.com/golang/go1.9.linux-amd64.tar.gz
- tar xvf go1.9.linux-amd64.tar.gz -C /usr/local/
+ wget {{ golang_download_url }} -P /opt/
+ tar xvf /opt/{{ golang_tarball }} -C /usr/local/
cat >> /etc/profile <<GOLANG__CONFIG_DOC
export GOROOT=/usr/local/go
export GOPATH=\$HOME/gopath
diff --git a/ci/ansible/roles/osdsdb/scenarios/etcd.yml b/ci/ansible/roles/osdsdb/scenarios/etcd.yml
index 79dc444..86f3a67 100644
--- a/ci/ansible/roles/osdsdb/scenarios/etcd.yml
+++ b/ci/ansible/roles/osdsdb/scenarios/etcd.yml
@@ -8,14 +8,14 @@
- name: download etcd
get_url:
url={{ etcd_download_url }}
- dest=/tmp/{{ etcd_tarball }}
+ dest=/opt/{{ etcd_tarball }}
when:
- etcdexisted.stat.exists is undefined or etcdexisted.stat.exists == false
- name: extract the etcd tarball
unarchive:
- src=/tmp/{{ etcd_tarball }}
- dest=/tmp/
+ src=/opt/{{ etcd_tarball }}
+ dest=/opt/
when:
- etcdexisted.stat.exists is undefined or etcdexisted.stat.exists == false
diff --git a/ci/ansible/roles/osdsdock/scenarios/ceph.yml b/ci/ansible/roles/osdsdock/scenarios/ceph.yml
index 2f6348e..2fa66b2 100644
--- a/ci/ansible/roles/osdsdock/scenarios/ceph.yml
+++ b/ci/ansible/roles/osdsdock/scenarios/ceph.yml
@@ -6,48 +6,48 @@
- name: check for ceph-ansible source code existed
stat:
- path: /tmp/ceph-ansible
+ path: /opt/ceph-ansible
ignore_errors: yes
register: cephansibleexisted
- name: download ceph-ansible source code
git:
repo: https://github.com/ceph/ceph-ansible.git
- dest: /tmp/ceph-ansible
+ dest: /opt/ceph-ansible
when:
- cephansibleexisted.stat.exists is undefined or cephansibleexisted.stat.exists == false
- name: copy ceph inventory host into ceph-ansible directory
copy:
src: ../../../group_vars/ceph/ceph.hosts
- dest: /tmp/ceph-ansible/ceph.hosts
+ dest: /opt/ceph-ansible/ceph.hosts
- name: copy ceph all.yml file into ceph-ansible group_vars directory
copy:
src: ../../../group_vars/ceph/all.yml
- dest: /tmp/ceph-ansible/group_vars/all.yml
+ dest: /opt/ceph-ansible/group_vars/all.yml
- name: copy ceph osds.yml file into ceph-ansible group_vars directory
copy:
src: ../../../group_vars/ceph/osds.yml
- dest: /tmp/ceph-ansible/group_vars/osds.yml
+ dest: /opt/ceph-ansible/group_vars/osds.yml
- name: copy site.yml.sample to site.yml in ceph-ansible
copy:
- src: /tmp/ceph-ansible/site.yml.sample
- dest: /tmp/ceph-ansible/site.yml
+ src: /opt/ceph-ansible/site.yml.sample
+ dest: /opt/ceph-ansible/site.yml
- name: ping all hosts
shell: ansible all -m ping -i ceph.hosts
become: true
args:
- chdir: /tmp/ceph-ansible
+ chdir: /opt/ceph-ansible
- name: run ceph-ansible playbook
shell: ansible-playbook site.yml -i ceph.hosts
become: true
args:
- chdir: /tmp/ceph-ansible
+ chdir: /opt/ceph-ansible
- name: Check if ceph osd is running
shell: ps aux | grep ceph-osd | grep -v grep
diff --git a/ci/ansible/roles/osdsdock/scenarios/cinder_standalone.yml b/ci/ansible/roles/osdsdock/scenarios/cinder_standalone.yml
index 4ad5cea..7939d75 100644
--- a/ci/ansible/roles/osdsdock/scenarios/cinder_standalone.yml
+++ b/ci/ansible/roles/osdsdock/scenarios/cinder_standalone.yml
@@ -114,7 +114,7 @@
sed -i "s/TAG ?= debian-cinder:latest/TAG ?= {{ cinder_image_tag }}:latest/g" Makefile
sed -i "s/image: debian-cinder/image: {{ cinder_image_tag }}/g" docker-compose.yml
- sed -i "s/image: lvm-debian-cinder/image: {{ cinder_image_tag }}/g" docker-compose.yml
+ sed -i "s/image: lvm-debian-cinder/image: lvm-{{ cinder_image_tag }}/g" docker-compose.yml
sed -i "s/volume_group = cinder-volumes /volume_group = {{ cinder_volume_group }}/g" etc/cinder.conf
become: true