diff options
author | wutianwei <wutianwei1@huawei.com> | 2017-07-04 17:46:39 +0800 |
---|---|---|
committer | wutianwei <wutianwei1@huawei.com> | 2017-07-06 11:08:59 +0800 |
commit | 191324087c0fc0524f8566de8eeec3e35e34dcca (patch) | |
tree | ffda15665058f3a691d41d176c977aef30b3076e /deploy/adapters/ansible/roles/config-compute/tasks | |
parent | f88debf12abbf678ad533c17997c535f63bc3799 (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-compute/tasks')
-rw-r--r-- | deploy/adapters/ansible/roles/config-compute/tasks/Ubuntu.yml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/config-compute/tasks/Ubuntu.yml b/deploy/adapters/ansible/roles/config-compute/tasks/Ubuntu.yml index 886a407f..6e6cae85 100644 --- a/deploy/adapters/ansible/roles/config-compute/tasks/Ubuntu.yml +++ b/deploy/adapters/ansible/roles/config-compute/tasks/Ubuntu.yml @@ -16,10 +16,28 @@ - meta: flush_handlers +- name: check apt source + shell: "ping -c 2 {{ LOCAL_REPOSITORY_IP }} > /dev/null" + register: checkresult + ignore_errors: "true" + +- name: change sources list(apt) + template: + src: sources.list.lab + dest: /etc/apt/sources.list + when: checkresult.rc == 0 + +- name: change sources list(apt) + template: + src: sources.list.official + dest: /etc/apt/sources.list + when: checkresult.rc != 0 + - name: Install apt packages apt: pkg: "nfs-kernel-server" state: "present" + update_cache: "yes" - name: make nfs dircetory file: "dest=/images mode=0777 state=directory" |