aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/config-compute/tasks
diff options
context:
space:
mode:
authorYifei Xue <xueyifei@huawei.com>2017-08-15 11:40:26 +0800
committerYifei Xue <xueyifei@huawei.com>2017-08-31 15:33:56 +0800
commit8c978370a123dccc0b93ee9bd2ba46f8167a2cc2 (patch)
treefe3b398de2de17e5c30ceea456dbe123bc1e6f69 /deploy/adapters/ansible/roles/config-compute/tasks
parent760c966b5095fb0cfe0a2ac4014a337531a8df1d (diff)
Support offline deployment for nosdn no feature scenario
JIRA: - Add a repo docker which includes ubuntu PPA and python packages used for offline deployment. Change-Id: Iad9b0df7f33f5a7ab974c5deffb408fc93b3f3ad Signed-off-by: Yifei Xue <xueyifei@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/config-compute/tasks')
-rw-r--r--deploy/adapters/ansible/roles/config-compute/tasks/Ubuntu.yml24
1 files changed, 24 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 6e6cae85..c36a7c2e 100644
--- a/deploy/adapters/ansible/roles/config-compute/tasks/Ubuntu.yml
+++ b/deploy/adapters/ansible/roles/config-compute/tasks/Ubuntu.yml
@@ -16,6 +16,18 @@
- meta: flush_handlers
+- name: create pip conf directory
+ file:
+ path: "~/.pip/"
+ state: directory
+ when: offline_deployment is defined and offline_deployment == "Enable"
+
+- name: add pip conf
+ template:
+ src: pip.conf.j2
+ dest: "~/.pip/pip.conf"
+ when: offline_deployment is defined and offline_deployment == "Enable"
+
- name: check apt source
shell: "ping -c 2 {{ LOCAL_REPOSITORY_IP }} > /dev/null"
register: checkresult
@@ -33,6 +45,18 @@
dest: /etc/apt/sources.list
when: checkresult.rc != 0
+- name: change sources list(apt)
+ template:
+ src: sources.list.offline
+ dest: /etc/apt/sources.list
+ when: offline_deployment is defined and offline_deployment == "Enable"
+
+- name: add apt.conf
+ copy:
+ src: apt.conf
+ dest: /etc/apt/apt.conf
+ when: offline_deployment is defined and offline_deployment == "Enable"
+
- name: Install apt packages
apt:
pkg: "nfs-kernel-server"