replace command with make

Change-Id: I3c20844fbdb02f22ae6b902351261da26f29b7ee
diff --git a/roles/test-exampleservice/tasks/main.yml b/roles/test-exampleservice/tasks/main.yml
index 4df5ea8..796abb4 100644
--- a/roles/test-exampleservice/tasks/main.yml
+++ b/roles/test-exampleservice/tasks/main.yml
@@ -4,17 +4,17 @@
 # Run tests to check that the single-node deployment has worked
 
 - name: Onboard ExampleService and instantiate a VM
-  command: chdir="{{ service_profile_repo_dest }}/{{ xos_configuration }}" bash -c "make exampleservice |& tee xos-make-exampleservice.out"
-  tags:
-    - skip_ansible_lint
+  make:
+    chdir: "{{ service_profile_repo_dest }}/{{ xos_configuration }}"
+    target: exampleservice
 
 - name: Pause 60 seconds (work around bug in synchronizer)
   pause: seconds=60
 
 - name: Re-run 'make vtn' (work around bug in synchronizer)
-  command: chdir="{{ service_profile_repo_dest }}/{{ xos_configuration }}" bash -c "make vtn |& tee xos-makevtn3.out"
-  tags:
-    - skip_ansible_lint
+  make:
+    chdir: "{{ service_profile_repo_dest }}/{{ xos_configuration }}"
+    target: vtn
 
 - name: Wait for ExampleService VM to come up
   shell: bash -c "source ~/admin-openrc.sh; nova list --all-tenants|grep 'exampleservice.*ACTIVE' > /dev/null"
diff --git a/roles/test-vsg/tasks/main.yml b/roles/test-vsg/tasks/main.yml
index 8fc494f..dda1612 100644
--- a/roles/test-vsg/tasks/main.yml
+++ b/roles/test-vsg/tasks/main.yml
@@ -4,17 +4,17 @@
 # Run tests to check that the CORD-in-a-Box deployment has worked.
 
 - name: Create cord subscriber
-  command: chdir="{{ service_profile_repo_dest }}/{{ xos_configuration }}" bash -c "make cord-subscriber |& tee xos-make-cord-subscriber.out"
-  tags:
-    - skip_ansible_lint
+  make:
+    chdir: "{{ service_profile_repo_dest }}/{{ xos_configuration }}"
+    target: cord-subscriber
 
 - name: Pause 60 seconds (work around bug in synchronizer)
   pause: seconds=60
 
 - name: Re-run 'make vtn' (work around bug in synchronizer)
-  command: chdir="{{ service_profile_repo_dest }}/{{ xos_configuration }}" bash -c "make vtn |& tee xos-makevtn2.out"
-  tags:
-    - skip_ansible_lint
+  make:
+    chdir: "{{ service_profile_repo_dest }}/{{ xos_configuration }}"
+    target: vtn
 
 - name: Wait for vSG VM to come up
   shell: bash -c "source ~/admin-openrc.sh; nova list --all-tenants|grep 'vsg.*ACTIVE' > /dev/null"
diff --git a/roles/xos-compute-setup/tasks/main.yml b/roles/xos-compute-setup/tasks/main.yml
index d159ff1..08c4f73 100644
--- a/roles/xos-compute-setup/tasks/main.yml
+++ b/roles/xos-compute-setup/tasks/main.yml
@@ -4,14 +4,17 @@
 # Tell XOS that a new compute node has been added
 
 - name: Build XOS containers
-  command: chdir="{{ service_profile_repo_dest }}/{{ xos_configuration }}" bash -c "make new-nodes |& tee xos-new-nodes.out"
-  tags:
-    - skip_ansible_lint
+  make:
+    chdir: "{{ service_profile_repo_dest }}/{{ xos_configuration }}"
+    target: new-nodes
 
 - name: Pause 5 seconds
   pause: seconds=5
 
+- name: Remove vtn-external.yaml
+  file: path="{{ service_profile_repo_dest }}/{{ xos_configuration }}/vtn-external.yaml" state=absent
+
 - name: Rebuild VTN configuration with new nodes block
-  command: chdir="{{ service_profile_repo_dest }}/{{ xos_configuration }}" bash -c "rm -f vtn-external.yaml; make vtn |& tee xos-makevtn2.out"
-  tags:
-    - skip_ansible_lint
+  make:
+    chdir: "{{ service_profile_repo_dest }}/{{ xos_configuration }}"
+    target: vtn
diff --git a/roles/xos-head-start/tasks/main.yml b/roles/xos-head-start/tasks/main.yml
index 7f6807e..11720c7 100644
--- a/roles/xos-head-start/tasks/main.yml
+++ b/roles/xos-head-start/tasks/main.yml
@@ -2,27 +2,27 @@
 # xos-start/tasks/main.yml
 
 - name: Build XOS containers
-  command: chdir="{{ service_profile_repo_dest }}/{{ xos_configuration }}" bash -c "make local_containers |& tee xos-build.out"
-  tags:
-    - skip_ansible_lint
+  make:
+    chdir: "{{ service_profile_repo_dest }}/{{ xos_configuration }}"
+    target: local_containers
 
 - name: Onboard services and start XOS
-  command: chdir="{{ service_profile_repo_dest }}/{{ xos_configuration }}" bash -c "make xos |& tee xos-onboard.out"
-  tags:
-    - skip_ansible_lint
+  make:
+    chdir: "{{ service_profile_repo_dest }}/{{ xos_configuration }}"
+    target: xos
 
 - name: Pause to let XOS initialize
   pause: seconds=120
 
 - name: Initial VTN configuration
-  command: chdir="{{ service_profile_repo_dest }}/{{ xos_configuration }}" bash -c "make vtn |& tee xos-makevtn.out"
-  tags:
-    - skip_ansible_lint
+  make:
+    chdir: "{{ service_profile_repo_dest }}/{{ xos_configuration }}"
+    target: vtn
 
 - name: Initial fabric configuration
-  command: chdir="{{ service_profile_repo_dest }}/{{ xos_configuration }}" bash -c "make fabric |& tee xos-makefabric.out"
-  tags:
-    - skip_ansible_lint
+  make:
+    chdir: "{{ service_profile_repo_dest }}/{{ xos_configuration }}"
+    target: fabric
 
 - name: Pause to let ONOS initialize
   pause: seconds=20
@@ -30,7 +30,6 @@
     - skip_ansible_lint
 
 - name: Configure CORD services
-  command: chdir="{{ service_profile_repo_dest }}/{{ xos_configuration }}" bash -c "make cord |& tee xos-makecord.out"
-  tags:
-    - skip_ansible_lint
-
+  make:
+    chdir: "{{ service_profile_repo_dest }}/{{ xos_configuration }}"
+    target: cord
diff --git a/roles/xos-install/defaults/main.yml b/roles/xos-install/defaults/main.yml
index a18a274..3e08263 100644
--- a/roles/xos-install/defaults/main.yml
+++ b/roles/xos-install/defaults/main.yml
@@ -2,7 +2,7 @@
 # default variables for xos-install role
 
 xos_repo_url: "https://gerrit.opencord.org/xos"
-xos_repo_dest: "~/xos"
+xos_repo_dest: "{{ ansible_user_dir }}/xos"
 xos_repo_branch: "HEAD"
 
 xos_configuration: "devel"
@@ -10,7 +10,7 @@
 xos_container_rebuild: False
 
 service_profile_repo_url: "https://gerrit.opencord.org/p/service-profile.git"
-service_profile_repo_dest: "~/service-profile"
+service_profile_repo_dest: "{{ ansible_user_dir }}/service-profile"
 service_profile_repo_branch: "HEAD"
 
 docker_tag: "latest"
diff --git a/vars/cord_defaults.yml b/vars/cord_defaults.yml
index 2978c38..11c32ee 100644
--- a/vars/cord_defaults.yml
+++ b/vars/cord_defaults.yml
@@ -14,7 +14,7 @@
 
 juju_config_path: /usr/local/src/juju_config.yml
 
-service_profile_repo_dest: "~/service-profile"
+service_profile_repo_dest: "{{ ansible_user_dir }}/service-profile"
 
 xos_configuration: cord-pod
 
diff --git a/vars/cord_single_defaults.yml b/vars/cord_single_defaults.yml
index f062ac3..41ae667 100644
--- a/vars/cord_single_defaults.yml
+++ b/vars/cord_single_defaults.yml
@@ -13,7 +13,7 @@
 
 juju_config_path: /usr/local/src/juju_config.yml
 
-service_profile_repo_dest: "~/service-profile"
+service_profile_repo_dest: "{{ ansible_user_dir }}/service-profile"
 
 xos_configuration: cord-pod