From 191324087c0fc0524f8566de8eeec3e35e34dcca Mon Sep 17 00:00:00 2001 From: wutianwei Date: Tue, 4 Jul 2017 17:46:39 +0800 Subject: 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 --- .../adapters/ansible/roles/config-osa/tasks/main.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'deploy/adapters/ansible/roles/config-osa/tasks/main.yml') 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 -- cgit 1.2.3-korg