From 066cb6635ed79ee7ebe5b4e7afcf1c4abdba4072 Mon Sep 17 00:00:00 2001 From: rohan47 Date: Fri, 30 Nov 2018 22:27:46 +0530 Subject: [PATCH] Added volume specification Signed-off-by: rohan47 --- .../roles/configure-gluster-volume/tasks/main.yml | 14 ++++++++++++++ ansible-playbook-base/site.yml | 6 ++++++ volume-specifications/vs-0000-0010.yml | 14 ++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 ansible-playbook-base/roles/configure-gluster-volume/tasks/main.yml create mode 100644 volume-specifications/vs-0000-0010.yml diff --git a/ansible-playbook-base/roles/configure-gluster-volume/tasks/main.yml b/ansible-playbook-base/roles/configure-gluster-volume/tasks/main.yml new file mode 100644 index 0000000..c301351 --- /dev/null +++ b/ansible-playbook-base/roles/configure-gluster-volume/tasks/main.yml @@ -0,0 +1,14 @@ +--- +# Tasks sets specification for gluster volume + +- name: Include gluster vol specification details + include_vars: + file: "{{ vs_definition }}" + run_once: true + +- name: Set gluster volume specification + gluster_volume: + state: "present" + name: "{{ volume }}" + options: "{{ options }}" + run_once: true diff --git a/ansible-playbook-base/site.yml b/ansible-playbook-base/site.yml index 66939ab..09bf089 100644 --- a/ansible-playbook-base/site.yml +++ b/ansible-playbook-base/site.yml @@ -73,6 +73,12 @@ tags: - glustervolume +- name: Set gluster volume specification + hosts: servers + gather_facts: false + roles: + - configure-gluster-volume + - name: Mount Gluster volume hosts: clients gather_facts: false diff --git a/volume-specifications/vs-0000-0010.yml b/volume-specifications/vs-0000-0010.yml new file mode 100644 index 0000000..85e9f3a --- /dev/null +++ b/volume-specifications/vs-0000-0010.yml @@ -0,0 +1,14 @@ +--- +volume: gbenchvol +options: + server.allow-insecure: 'on' + server.event-threads: '4' + client.event-threads: '4' + features.cache-invalidation: 'on' + features.cache-invalidation-timeout: '600' + performance.stat-prefetch: 'on' + performance.cache-invalidation: 'on' + performance.md-cache-timeout: '600' + network.inode-lru-limit: '90000' + cluster.lookup-optimize: 'on' +