Initial commit of the voltha installer. There are several things that
need to be cleaned up but the installer is fully functional in test
mode and creates 3 non-clustered VMs with identical voltha installs
until such time as HA is ready. Once HA is ready, the scripts will be
modified to deploy the full HA cluster.
This update partially addresses Epic VOL-6.

Made changes requested by the reviewers.

Change-Id: I083239e1f349136d2ec1e51e09391da341177076
diff --git a/install/ansible/roles/common/defaults/main.yml b/install/ansible/roles/common/defaults/main.yml
new file mode 100644
index 0000000..7be66d2
--- /dev/null
+++ b/install/ansible/roles/common/defaults/main.yml
@@ -0,0 +1,24 @@
+hosts: [
+  { host_ip: "10.100.198.220", host_name: "voltha"},
+]
+
+use_latest_for:
+  - debian-keyring
+  - debian-archive-keyring
+  - python-dev
+  - kafkacat
+  - libssl-dev
+  - libffi-dev
+  - libpcap-dev
+  - libxml2-dev
+  - libxslt1-dev
+  - python-virtualenv
+  - jq
+  - python-nose
+  - python-flake8
+  - python-scapy
+#  - python-libpcap
+
+obsolete_services:
+  - puppet
+  - chef-client
diff --git a/install/ansible/roles/common/files/ssh_config b/install/ansible/roles/common/files/ssh_config
new file mode 100644
index 0000000..990a43d
--- /dev/null
+++ b/install/ansible/roles/common/files/ssh_config
@@ -0,0 +1,3 @@
+Host *
+   StrictHostKeyChecking no
+   UserKnownHostsFile=/dev/null
diff --git a/install/ansible/roles/common/tasks/main.yml b/install/ansible/roles/common/tasks/main.yml
new file mode 100644
index 0000000..8b1c054
--- /dev/null
+++ b/install/ansible/roles/common/tasks/main.yml
@@ -0,0 +1,48 @@
+- name: JQ is present
+  apt:
+    name: jq
+    force: yes
+  tags: [common]
+
+- name: Host is present
+  lineinfile:
+    dest: /etc/hosts
+    regexp: "^{{ item.host_ip }}"
+    line: "{{ item.host_ip }} {{ item.host_name }}"
+  with_items: "{{ hosts }}"
+  tags: [common]
+
+- name: Latest apt packages
+  apt:
+    name: "{{ item }}"
+  with_items: "{{ use_latest_for }}"
+  when: target != "cluster"
+  tags: [common]
+
+- name: Services are not running
+  service:
+    name: "{{ item }}"
+    state: stopped
+  ignore_errors: yes
+  with_items: "{{ obsolete_services }}"
+  tags: [common]
+
+- name: Ensure there is a .ssh directory for /root
+  file:
+    path: "{{ ansible_env['HOME'] }}/.ssh"
+    state: directory
+    owner: root
+    group: root
+
+- name: Ensure known_hosts file is absent
+  file:
+    path: "{{ ansible_env['HOME'] }}/.ssh/known_hosts"
+    state: absent
+
+- name: Disable Known Host Checking
+  copy:
+    src: files/ssh_config
+    dest: "{{ ansible_env['HOME'] }}/.ssh/config"
+    owner: root
+    group: root
+    mode: 0600