add barbican client role

Change-Id: Id05058e0a46a033c8bb181f25ce180a92153e2e5
diff --git a/barbican/client.sls b/barbican/client.sls
new file mode 100644
index 0000000..5577ddf
--- /dev/null
+++ b/barbican/client.sls
@@ -0,0 +1,8 @@
+{%- from "barbican/map.jinja" import client with context %}
+{%- if client.enabled %}
+
+barbican_client_packages:
+  pkg.installed:
+  - names: {{ client.pkgs }}
+
+{%- endif %}
diff --git a/barbican/init.sls b/barbican/init.sls
index 469db73..27fbfe9 100644
--- a/barbican/init.sls
+++ b/barbican/init.sls
@@ -3,4 +3,7 @@
 {%- if pillar.barbican.server is defined %}
 - barbican.server
 {%- endif %}
+{%- if pillar.barbican.client is defined %}
+- barbican.client
+{%- endif %}
 {%- endif %}
diff --git a/barbican/map.jinja b/barbican/map.jinja
index f7332ad..f334fec 100644
--- a/barbican/map.jinja
+++ b/barbican/map.jinja
@@ -1,5 +1,5 @@
 
-{%- load_yaml as base_defaults %}
+{%- load_yaml as server_defaults %}
 default:
   bind:
     address: 127.0.0.1
@@ -14,7 +14,13 @@
   services:
   - barbican-keystone-listener
   - barbican-worker
-
 {%- endload %}
 
-{%- set server = salt['grains.filter_by'](base_defaults, merge=salt['pillar.get']('barbican:server'), base='default') %}
+{%- load_yaml as client_defaults %}
+Debian:
+  pkgs:
+  - python-barbicanclient
+{%- endload %}
+
+{%- set server = salt['grains.filter_by'](server_defaults, merge=salt['pillar.get']('barbican:server'), base='default') %}
+{%- set client = salt['grains.filter_by'](client_defaults, merge=salt['pillar.get']('barbican:client')) %}
diff --git a/metadata/service/client/cluster.yml b/metadata/service/client/cluster.yml
new file mode 100644
index 0000000..61a46d9
--- /dev/null
+++ b/metadata/service/client/cluster.yml
@@ -0,0 +1,6 @@
+applications:
+- barbican
+parameters:
+  barbican:
+    client:
+      enabled: true
diff --git a/metadata/service/client/single.yml b/metadata/service/client/single.yml
new file mode 100644
index 0000000..61a46d9
--- /dev/null
+++ b/metadata/service/client/single.yml
@@ -0,0 +1,6 @@
+applications:
+- barbican
+parameters:
+  barbican:
+    client:
+      enabled: true