aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/config-controller
diff options
context:
space:
mode:
authorJustin chi <chigang@huawei.com>2017-09-01 08:25:01 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-09-01 08:25:01 +0000
commit292985dab007c3ee1c3481c985871a3483d9f7bc (patch)
treebfc4888a633f5ea7bf43287cfd9a6c2f2e23dbf2 /deploy/adapters/ansible/roles/config-controller
parentfd8f9747f93b6a6d40c32ae5b727780fe1206039 (diff)
parent8c978370a123dccc0b93ee9bd2ba46f8167a2cc2 (diff)
Merge "Support offline deployment for nosdn no feature scenario"
Diffstat (limited to 'deploy/adapters/ansible/roles/config-controller')
-rw-r--r--deploy/adapters/ansible/roles/config-controller/files/apt.conf3
-rw-r--r--deploy/adapters/ansible/roles/config-controller/tasks/Ubuntu.yml12
-rw-r--r--deploy/adapters/ansible/roles/config-controller/templates/sources.list.offline1
3 files changed, 16 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/config-controller/files/apt.conf b/deploy/adapters/ansible/roles/config-controller/files/apt.conf
new file mode 100644
index 00000000..afe7ab9e
--- /dev/null
+++ b/deploy/adapters/ansible/roles/config-controller/files/apt.conf
@@ -0,0 +1,3 @@
+APT::Get::Assume-Yes "true";
+APT::Get::force-yes "true";
+APT::Get::AllowUnauthenticated "true";
diff --git a/deploy/adapters/ansible/roles/config-controller/tasks/Ubuntu.yml b/deploy/adapters/ansible/roles/config-controller/tasks/Ubuntu.yml
index e3b467cf..c45980f7 100644
--- a/deploy/adapters/ansible/roles/config-controller/tasks/Ubuntu.yml
+++ b/deploy/adapters/ansible/roles/config-controller/tasks/Ubuntu.yml
@@ -32,3 +32,15 @@
src: sources.list.official
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"
diff --git a/deploy/adapters/ansible/roles/config-controller/templates/sources.list.offline b/deploy/adapters/ansible/roles/config-controller/templates/sources.list.offline
new file mode 100644
index 00000000..15aa736f
--- /dev/null
+++ b/deploy/adapters/ansible/roles/config-controller/templates/sources.list.offline
@@ -0,0 +1 @@
+deb [arch=amd64] http://{{ offline_repo_ip }}:{{ offline_repo_port }}/xenial-ocata-ppa xenial main