aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/config-osa
diff options
context:
space:
mode:
authorwutianwei <wutianwei1@huawei.com>2017-07-04 17:46:39 +0800
committerwutianwei <wutianwei1@huawei.com>2017-07-06 11:08:59 +0800
commit191324087c0fc0524f8566de8eeec3e35e34dcca (patch)
treeffda15665058f3a691d41d176c977aef30b3076e /deploy/adapters/ansible/roles/config-osa
parentf88debf12abbf678ad533c17997c535f63bc3799 (diff)
fetch openrc for functest
We use openstack-ansible to deploy the openstack, the position of openrc is different from the before. change the apt source when use local apt repository Change-Id: I1c5492b294a8645f452868c9cf2fec2e0802f823 Signed-off-by: wutianwei <wutianwei1@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/config-osa')
-rw-r--r--deploy/adapters/ansible/roles/config-osa/files/fetch-openrc.yml18
-rw-r--r--deploy/adapters/ansible/roles/config-osa/files/http.yml8
-rw-r--r--deploy/adapters/ansible/roles/config-osa/files/setup-ovs.yml8
-rw-r--r--deploy/adapters/ansible/roles/config-osa/tasks/main.yml19
-rw-r--r--deploy/adapters/ansible/roles/config-osa/vars/main.yml10
5 files changed, 63 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/config-osa/files/fetch-openrc.yml b/deploy/adapters/ansible/roles/config-osa/files/fetch-openrc.yml
new file mode 100644
index 00000000..1251cbf1
--- /dev/null
+++ b/deploy/adapters/ansible/roles/config-osa/files/fetch-openrc.yml
@@ -0,0 +1,18 @@
+# #############################################################################
+# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+- name: Fetch openrc
+ hosts: utility_all[0]
+ max_fail_percentage: 20
+ user: root
+ tasks:
+ - fetch:
+ src: /root/openrc
+ dest: /opt/openrc
+ flat: "yes"
diff --git a/deploy/adapters/ansible/roles/config-osa/files/http.yml b/deploy/adapters/ansible/roles/config-osa/files/http.yml
index 248fc06d..d5c1e64e 100644
--- a/deploy/adapters/ansible/roles/config-osa/files/http.yml
+++ b/deploy/adapters/ansible/roles/config-osa/files/http.yml
@@ -1,3 +1,11 @@
+# #############################################################################
+# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
---
- name: change https to http in haproxy configuratio
hosts: network_hosts
diff --git a/deploy/adapters/ansible/roles/config-osa/files/setup-ovs.yml b/deploy/adapters/ansible/roles/config-osa/files/setup-ovs.yml
index 57bc5ef1..9f65cd5d 100644
--- a/deploy/adapters/ansible/roles/config-osa/files/setup-ovs.yml
+++ b/deploy/adapters/ansible/roles/config-osa/files/setup-ovs.yml
@@ -1,3 +1,11 @@
+# #############################################################################
+# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
---
- name: Installation and setup of Neutron
hosts: neutron_openvswitch_agent
diff --git a/deploy/adapters/ansible/roles/config-osa/tasks/main.yml b/deploy/adapters/ansible/roles/config-osa/tasks/main.yml
index 8246d6e7..aac18153 100644
--- a/deploy/adapters/ansible/roles/config-osa/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/config-osa/tasks/main.yml
@@ -22,6 +22,20 @@
src: user_variables.yml.j2
dest: /etc/openstack_deploy/user_variables.yml
+- name: check apt source
+ shell: "ping -c 2 {{ LOCAL_REPOSITORY_IP }} > /dev/null"
+ register: checkresult
+ ignore_errors: "true"
+
+- name: add mariadb local repository
+ blockinfile:
+ dest: /etc/openstack_deploy/user_variables.yml
+ block: |
+ galera_client_apt_repo_url: "http://192.168.137.222/mariadb"
+ galera_repo_url: "[ arch=amd64 ] http://192.168.137.222/mariadb"
+ uca_apt_repo_url: "[ arch=amd64 ] http://192.168.137.222/ubuntu-cloud"
+ when: checkresult.rc == 0
+
- name: copy cinder.yml
copy:
src: cinder.yml
@@ -56,3 +70,8 @@
copy:
src: http.yml
dest: /opt/openstack-ansible/playbooks/http.yml
+
+- name: copy fetch-openrc.yml
+ copy:
+ src: fetch-openrc.yml
+ dest: /opt/openstack-ansible/playbooks/fetch-openrc.yml
diff --git a/deploy/adapters/ansible/roles/config-osa/vars/main.yml b/deploy/adapters/ansible/roles/config-osa/vars/main.yml
new file mode 100644
index 00000000..783ea0d0
--- /dev/null
+++ b/deploy/adapters/ansible/roles/config-osa/vars/main.yml
@@ -0,0 +1,10 @@
+# #############################################################################
+# Copyright (c) 2017 HUAWEI TECHNOLOGIES CO.,LTD and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+LOCAL_REPOSITORY_IP: "192.168.137.222"