offline-deployment: Adapt k8s deployment to new packaging

This change updates the functionality introduced by Ignacio
to adapt offline deployment to new packaging and local apt
and docker registry services instead of using apt-cacher-ng
or kubespray local cache. Please note that the change is
not compatible to previous method of offline installation
as it introduces some drastic changes. Also, only bifrost
and kubespray are supported and the work to support heat is
pending. Baremetal is not supported either and will be introduced
once this and other changes this one depends on are merged.

The implementation and usage details are in user-guide.rst
so please refer to it for details.

Change-Id: Ib768476c9bf23b2d772490293bef66e7c055e108
diff --git a/playbooks/roles/install-configure-bifrost/tasks/main.yml b/playbooks/roles/install-configure-bifrost/tasks/main.yml
index 6d0aca1..77b7952 100644
--- a/playbooks/roles/install-configure-bifrost/tasks/main.yml
+++ b/playbooks/roles/install-configure-bifrost/tasks/main.yml
@@ -29,7 +29,7 @@
     http_proxy: "{{ lookup('env','http_proxy') }}"
     https_proxy: "{{ lookup('env','https_proxy') }}"
     no_proxy: "{{ lookup('env','no_proxy') }}"
-  when: not offline_deployment|bool
+  when: execution_mode == 'online-deployment'
 
 - name: Install bifrost requirements
   pip:
@@ -63,7 +63,7 @@
 - include_tasks: create-bifrost-playbooks.yml
 
 - include_tasks: configure-bifrost-offline.yml
-  when: offline_deployment|bool
+  when: execution_mode == 'offline-deployment'
 
 - name: Create folders to put ipa and deployment images
   file:
@@ -85,6 +85,6 @@
     - {source: "{{ deployment_image }}", destination: "/httpboot/deployment_image.qcow2", download: "{{ use_prebuilt_deployment_image }}"}
     - {source: "{{ ipa_initramfs }}", destination: "/httpboot/ipa.initramfs", download: "true"}
     - {source: "{{ ipa_kernel }}", destination: "/httpboot/ipa.kernel", download: "true"}
-  when: not offline_deployment|bool
+  when: execution_mode == 'online-deployment'
 
 # vim: set ts=2 sw=2 expandtab: