Additional changes to remove privilaged command execution during the
installation proces. Also removed surplus file copies that are no longer
required.
A corner case where a vagrant VM isn't created before the installer is
run results in the vagrant-libvirt network not being defined or started.
Without this network the installer VM could not be started.
Change-Id: I2bd69a81b67c0f8149cd80abddce869675acba7d
diff --git a/install/ansible/roles/cluster-host/tasks/main.yml b/install/ansible/roles/cluster-host/tasks/main.yml
index 3d2296e..8035072 100644
--- a/install/ansible/roles/cluster-host/tasks/main.yml
+++ b/install/ansible/roles/cluster-host/tasks/main.yml
@@ -64,11 +64,20 @@
tags: [cluster-host]
- name: apt lists are up-to-date
- copy:
+ synchronize:
src: "/var/lib/apt/lists"
- dest: "/var/lib/apt"
+ dest: "/var/lib/apt/lists"
+ archive: no
+ owner: no
+ perms: no
+ rsync_opts:
+ - "--exclude=lock"
+ - "--exclude=partial"
+ recursive: yes
+ links: yes
tags: [cluster_host]
+
- name: Dependent software is installed (this can take about 10 Min, DONT'T PANIC, go for coffee instead)
command: dpkg -R -i "{{ target_voltha_home }}/deb_files"
# ignore_errors: true
diff --git a/install/ansible/roles/installer/tasks/main.yml b/install/ansible/roles/installer/tasks/main.yml
index 57125df..dc6bbcf 100644
--- a/install/ansible/roles/installer/tasks/main.yml
+++ b/install/ansible/roles/installer/tasks/main.yml
@@ -31,38 +31,12 @@
recursive: yes
links: yes
with_items:
- - install/sort_packages.sh
- - install/sort_packages.py
- install/installer.sh
- install/install.cfg
- install/ansible
- compose
- nginx_config
tags: [installer]
-- name: Installer directories are owned by vinstall
- file:
- path: /home/vinstall/{{ item }}
- owner: vinstall
- group: vinstall
- recurse: yes
- follow: no
- with_items:
- - ansible
- - compose
- - nginx_config
- tags: [installer]
-- name: Installer files are owned by vinstall
- file:
- path: /home/vinstall/{{ item }}
- owner: vinstall
- group: vinstall
- follow: no
- with_items:
- - sort_packages.sh
- - sort_packages.py
- - installer.sh
- - install.cfg
- tags: [installer]
- name: Determine if test mode is active
become: false
@@ -96,3 +70,30 @@
- name: Deb file directory is renamed
command: mv /home/vinstall/archives /home/vinstall/deb_files
tags: [installer]
+- name: Installer directories are owned by vinstall
+ file:
+ path: /home/vinstall/{{ item }}
+ owner: vinstall
+ group: vinstall
+ recurse: yes
+ follow: no
+ with_items:
+ - ansible
+ - compose
+ - nginx_config
+ - .ansible
+ - deb_files
+ - docker-py
+ - netifaces
+ tags: [installer]
+- name: Installer files are owned by vinstall
+ file:
+ path: /home/vinstall/{{ item }}
+ owner: vinstall
+ group: vinstall
+ follow: no
+ with_items:
+ - installer.sh
+ - install.cfg
+ - docker-compose-Linux-x86_64
+ tags: [installer]