[CORD-2867]
Fix `local-ubuntu-dev-env` make target for Ubuntu 16.04, aligning with
apache-proxy role

Change-Id: I7944eeb67014a7f26d65fb4c3e548271b1c5a454
diff --git a/roles/dev-env/handlers/main.yml b/roles/dev-env/handlers/main.yml
new file mode 100644
index 0000000..363e0c3
--- /dev/null
+++ b/roles/dev-env/handlers/main.yml
@@ -0,0 +1,22 @@
+---
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# dev-env/handlers/main.yml
+
+- name: reload apache2
+  become: yes
+  service:
+    name: apache2
+    state: reloaded
diff --git a/roles/dev-env/tasks/main.yml b/roles/dev-env/tasks/main.yml
index 87882fb..6482995 100644
--- a/roles/dev-env/tasks/main.yml
+++ b/roles/dev-env/tasks/main.yml
@@ -1,4 +1,4 @@
-
+---
 # Copyright 2017-present Open Networking Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,8 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-
----
 # dev-env/tasks/main.yml
 
 - name: Create SSH keypair
@@ -23,7 +21,7 @@
     generate_ssh_key: yes
     ssh_key_bits: 2048
 
-- name: Create node_key
+- name: Copy SSH public key as node_key
   copy:
     src: "{{ ansible_env.HOME }}/.ssh/id_rsa.pub"
     dest: "{{ ansible_env.HOME }}/node_key"
@@ -33,10 +31,10 @@
   apt:
     name: "{{ item }}"
     update_cache: yes
+    cache_valid_time: 3600
   with_items:
-  - "apache2"
-  - "libapache2-mod-fcgid"
-  - "apache2-mpm-worker"
+    - apache2
+    - apache2-utils
 
 - name: Configure Apache
   become: yes
@@ -44,22 +42,22 @@
     name: "{{ item }}"
     state: present
   with_items:
-  - "proxy_http"
-  - "headers"
-  - "rewrite"
-  - "proxy_wstunnel"
+    - headers
+    - proxy
+    - proxy_http
+    - proxy_wstunnel
+    - rewrite
+  notify: reload apache2
 
 - name: Copy Apache conf
   become: yes
   copy:
     src: "roles/apache-proxy/files/cord-http.conf"
     dest: "/etc/apache2/conf-enabled/cord-http.conf"
-
-- name: Reload Apache
-  become: yes
-  service:
-    name: apache2
-    state: reloaded
+    owner: root
+    group: root
+    mode: 0644
+  notify: reload apache2
 
 - name: Add hosts
   become: yes
@@ -73,3 +71,4 @@
   - "127.0.0.1 xos-chameleon"
   - "127.0.0.1 xos-core"
   - "127.0.0.1 xos-tosca"
+