Support Accumulo 2.1 cluster.yaml file (#430)

diff --git a/ansible/roles/accumulo/defaults/main.yml b/ansible/roles/accumulo/defaults/main.yml
index 327ab28..5da8151 100644
--- a/ansible/roles/accumulo/defaults/main.yml
+++ b/ansible/roles/accumulo/defaults/main.yml
@@ -16,4 +16,3 @@
 #
 
 accumulo_build_native_cmd: {'1': '{{ accumulo_home }}/bin/build_native_library.sh', '2': '{{ accumulo_home }}/bin/accumulo-util build-native'}
-accumulo_tservers_fn: {'1': 'slaves', '2': 'tservers'}
diff --git a/ansible/roles/accumulo/tasks/main.yml b/ansible/roles/accumulo/tasks/main.yml
index 6c99594..6cfd602 100644
--- a/ansible/roles/accumulo/tasks/main.yml
+++ b/ansible/roles/accumulo/tasks/main.yml
@@ -36,7 +36,10 @@
     - masters
     - monitor
   when: accumulo_major_version == '1'
-- name: "configure accumulo 2.X configuration"
+- name: "configure tservers using managed templates"
+  template: src=tservers dest={{ accumulo_home }}/conf/slaves
+  when: accumulo_major_version == '1'
+- name: "configure accumulo 2.0.X configuration"
   template: src={{ item }} dest={{ accumulo_home }}/conf/{{ item }}
   with_items:
     - accumulo-env.sh
@@ -45,13 +48,16 @@
     - gc
     - masters
     - monitor
-  when: accumulo_major_version == '2'
-- name: "configure accumulo 2.0 tracer"
-  template: src=tracers dest={{ accumulo_home }}/conf/tracers
+    - tracers
+    - tservers
   when: accumulo_version is version('2.0.0','>=') and accumulo_version is version('2.1.0','<')
-- name: "Rename 'masters' file to 'managers' when using Accumulo 2.1 or above"
-  shell: |
-    [[ -e {{ accumulo_home }}/conf/masters ]] && mv {{ accumulo_home }}/conf/masters {{ accumulo_home }}/conf/managers || echo "Nothing to do"
+- name: "configure accumulo >= 2.1.0 configuration"
+  template: src={{ item }} dest={{ accumulo_home }}/conf/{{ item }}
+  with_items:
+    - accumulo-env.sh
+    - accumulo.properties
+    - accumulo-client.properties
+    - cluster.yaml
   when: accumulo_version is version('2.1.0','>=')
 - name: "configure accumulo 2.0.0 logging"
   command: cp {{ accumulo_home }}/conf/templates/{{ item }} {{ accumulo_home }}/conf/ creates={{ accumulo_home }}/conf/{{ item }}
@@ -69,8 +75,6 @@
   with_items:
     - hadoop-metrics2-accumulo.properties
   when: "'metrics' in groups"
-- name: "configure tservers using managed templates"
-  template: src=tservers dest={{ accumulo_home }}/conf/{{ accumulo_tservers_fn[accumulo_major_version] }}
 - name: "build accumulo native libraries"
   command: "{{ accumulo_build_native_cmd[accumulo_major_version] }}"
   args:
diff --git a/ansible/roles/accumulo/templates/cluster.yaml b/ansible/roles/accumulo/templates/cluster.yaml
new file mode 100644
index 0000000..e9d349a
--- /dev/null
+++ b/ansible/roles/accumulo/templates/cluster.yaml
@@ -0,0 +1,19 @@
+manager:
+{% for host in groups['accumulomaster'] %}
+  - {{ host }}
+{% endfor %}
+
+monitor:
+{% for host in groups['accumulomaster'] %}
+  - {{ host }}
+{% endfor %}
+
+gc:
+{% for host in groups['accumulomaster'] %}
+  - {{ host }}
+{% endfor %}
+
+tserver:
+{% for host in groups['workers'] %}
+  - {{ host }}
+{% endfor %}