Improve rancher role testability

Move functionality from playbook to rancher role.
Introduce defaults for holding default values in rancher role.
Other small changes noticed while testing rancher role with molecule.

Issue-ID: OOM-1729

Change-Id: I83befa9f0964c67e209d3def76bafd2a61c1ef33
Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
diff --git a/ansible/roles/rancher/tasks/rancher_server.yml b/ansible/roles/rancher/tasks/rancher_server.yml
index 64b35e4..d30be72 100644
--- a/ansible/roles/rancher/tasks/rancher_server.yml
+++ b/ansible/roles/rancher/tasks/rancher_server.yml
@@ -2,7 +2,7 @@
 # DO NOT ADD SPACE AROUND ';'
 - name: Start rancher/server:{{ rancher_server_version }}
   docker_container:
-    name: rancher_server
+    name: rancher-server
     image: rancher/server:{{ rancher_server_version }}
     command: ["sh", "-c", "/usr/sbin/update-ca-certificates;/usr/bin/entry /usr/bin/s6-svscan /service"]
     ports: 8080:8080
@@ -39,13 +39,3 @@
     key_private: "{{ env.data.apikey.private }}"
     rancher_agent_image: "{{ env.data.registration_tokens.image }}"
     rancher_agent_reg_url: "{{ env.data.registration_tokens.reg_url }}"
-
-- name: Ensure .kube directory exists
-  file:
-    path: "{{ kube_directory }}"
-    state: directory
-
-- name: Create kube config
-  template:
-    src: kube_config.j2
-    dest: "{{ kube_directory }}/config"