diff --git a/README.md b/README.md
index 603dbf9cc33f3888437c9b91a9e0e1cda8776a86..34d8eda22111a7099332130b689fcd8ef35bfa28 100755
--- a/README.md
+++ b/README.md
@@ -35,39 +35,235 @@ once inside, we can start invoking the scripts.
 ```bash
 cd /kubernetes-vagrant/ansible/
 export ANSIBLE_CONFIG=/kubernetes-vagrant/ansible/ansible.cfg
-echo this is not required with ansible 2.12 ./01_add_required_ansible_modules.sh
-./02_hosts_from_inventory.sh
-./03_upgrade.sh
-./04_epel.sh
-./05_development.sh
-./06_check_macs_vagrant_eth1.sh
-./07_install_kubernetes_kubeadm_docker.sh
-echo inside the following script we can adjust the cidrs
-./08_bootstrap_kubernetes_kubeadm.sh
-./09_enable_kubectl_at_management.sh
-./10_calico_network_kubernetes.sh
-echo we can check that nodes become ready
-kubectl get nodes
-./11_kubernetes_dashboard.sh
-./12_enable_helm_at_management.sh
-echo inside the following script we can adjust the lb ip range
-./13_install_metallb.sh
-echo we should wait until the metallb controller gets ready, this may take even 5 minutes
-kubectl get pod -A
-echo once the metallb is ready we can use it for loadbalancer based services
-kubectl create deployment nginx --image=nginx --port=80
-kubectl expose deployment nginx --type=LoadBalancer --name=nginx-service
-kubectl describe service nginx-service
-curl http://192.168.56.200
-./14_install_nginx_ingress.sh
-echo we check the ingress status
-kubectl get services -A
-echo we test ingress
+./B1_setup_and_launch.sh
+echo alternately we can call B2_clear_and_launch.sh to reset an start from scratch
+````
+
+B1_setup_and_launch performs a series of instalation steps.
+* ./01_add_required_ansible_modules.sh
+* ./02_hosts_from_inventory.sh
+* ./03_upgrade.sh
+* ./04_epel.sh
+* ./05_development.sh
+* ./06_pre_install_kubernetes_kubeadm_docker_checks.sh
+* ./07_install_kubernetes_kubeadm_docker.sh
+* ./08_bootstrap_kubernetes_kubeadm.sh
+
+At this point kubernetes is installed but is useless. It has no network that enables the comunication, it has no loadbalancer that allows the connection from the outside, it has no reverse proxy to allow multiple endpoints to be accessible from the same ip, it has no certificate generator if we are using https, it has no persistance layer, etc. The following steps provides solutions to these desired kubernetes features. 
+
+* ./09_enable_kubectl.sh
+* ./10_calico_network_kubernetes.sh
+* ./11_enable_calicoctl_at_all_kubernetes.sh
+* ./12_enable_helm.sh
+* ./13_kubernetes_dashboard.sh
+* ./14_install_metallb.sh
+* ./15_install_nginx_ingress.sh
+* ./16_install_cert_manager.sh
+* ./17_install_gluster.sh
+
+## Testing features
+
+Once kubernetes is installed we can test the different features.
+
+
+### using kubectl proxy to access kubernetes information 
+
+kubectl proxy allows to access the kubernetes API. 
+```
+echo we start the proxy in background and we capture the pid for killing afterwards
+kubectl proxy --address='0.0.0.0' &
+export proxy_pid=$!
+echo $proxy_pid
+curl http://127.0.0.1:8001/api/v1/
+kill $proxy_pid
+```
+
+### test calico accessing a clusterIP service with proxy
+kubectl proxy can be used to access internal services.
+```
+kubectl create deployment web --image=gcr.io/google-samples/hello-app:1.0
+kubectl expose deployment web --port=8080
+kubectl describe service web
+kubectl proxy --address='0.0.0.0' &
+export proxy_pid=$!
+echo $proxy_pid
+curl http://127.0.0.1:8001/api/v1/namespaces/default/services/web
+curl http://127.0.0.1:8001/api/v1/namespaces/default/services/http:web:/proxy/
+kill $proxy_pid
+kubectl delete service web
+kubectl delete deployment web
+```
+
+### test calico accessing a service using nodeport
+pods can be accessible directly in dedicated ports, this can be used to exposer tcp/udp services in some cases
+```
 kubectl create deployment web --image=gcr.io/google-samples/hello-app:1.0
-kubectl expose deployment web --type=NodePort --port=8080
+kubectl expose deployment web --port=8080 --type=NodePort  --overrides '{ "apiVersion": "v1","spec":{"ports":[{"port":80,"protocol":"TCP","targetPort":8080,"nodePort":32055}]}}'
+kubectl describe service web
+curl http://192.168.56.11:32055
+curl http://192.168.56.12:32055
+curl http://192.168.56.13:32055
+kubectl delete service web
+kubectl delete deployment web
+```
+
+### test calico accessing a service using load balancer
+kubernetes request the load balancer an available vip (virtual ip) and links the service to that ip
+```
+kubectl create deployment web --image=gcr.io/google-samples/hello-app:1.0 
+kubectl expose deployment web --type=LoadBalancer --target-port=8080 --port=80
+kubectl describe service web
+curl http://192.168.56.201
+kubectl delete service web
+kubectl expose deployment web --type=LoadBalancer --port=8080
+kubectl describe service web
+curl http://192.168.56.201:8080
+kubectl delete service web
+kubectl delete deployment web
+```
+
+### test accessing service using ingress reverse proxy
+```
+kubectl create deployment web --image=gcr.io/google-samples/hello-app:1.0
+kubectl expose deployment web --port=8080
+kubectl describe service web
 curl -L https://k8s.io/examples/service/networking/example-ingress.yaml
 kubectl apply -f https://k8s.io/examples/service/networking/example-ingress.yaml
-echo 192.168.56.201 hello-world.info | sudo tee -a /etc/hosts
+sudo sed -i -e "/hello-world.info/d" /etc/hosts
+echo 192.168.56.200 hello-world.info | sudo tee -a /etc/hosts
 curl http://hello-world.info
-````
+kubectl delete ingress example-ingress
+kubectl delete service web
+kubectl delete deployment web
+```
+
+
+### test certificate manager
+```
+/kubernetes-vagrant/ansible/C1_create_ca.sh
+echo we upload the certificate to kubernetes
+export CERT_WORKING_DIR=$(realpath ~/cert)
+echo CERT_WORKING_DIR=$CERT_WORKING_DIR
+kubectl create secret tls web-deployment-tls-ca-key-pair --cert=$CERT_WORKING_DIR/ca.crt.pem --key=$CERT_WORKING_DIR/ca.key.pem 
+kubectl describe secret web-deployment-tls-ca-key-pair
+echo we visualize the certificate
+kubectl get secret web-deployment-tls-ca-key-pair -o go-template='{{index .data "tls.crt" | base64decode }}' | openssl x509 -text -noout -serial
+echo we create the certificate issuer based on that secret
+cat > $CERT_WORKING_DIR/issuer.yaml << EOF
+apiVersion: cert-manager.io/v1
+kind: Issuer
+metadata:
+  name: web-ca-issuer
+  namespace: default
+spec:
+  ca:
+    secretName: web-deployment-tls-ca-key-pair
+EOF
+kubectl apply -f $CERT_WORKING_DIR/issuer.yaml
+kubectl get issuers
+kubectl describe issuers web-ca-issuer
+echo we create the service
+kubectl create deployment web --image=gcr.io/google-samples/hello-app:1.0
+kubectl expose deployment web --port=8080
+echo we create the ingress manifest 
+cat > $CERT_WORKING_DIR/ingress.yaml << EOF
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  annotations:
+    # add an annotation indicating the issuer to use.
+    cert-manager.io/issuer: web-ca-issuer
+  name: example-ingress
+  namespace: default
+spec:
+  rules:
+  - host: hello-world.info
+    http:
+      paths:
+      - pathType: Prefix
+        path: /
+        backend:
+          service:
+            name: web
+            port:
+              number: 8080
+  tls: # < placing a host in the TLS config will determine what ends up in the cert's subjectAltNames
+  - hosts:
+    - hello-world.info
+    secretName: myingress-cert # < cert-manager will store the created certificate in this secret.
+EOF
+kubectl apply -f $CERT_WORKING_DIR/ingress.yaml
+sleep 5
+curl https://hello-world.info --cacert $CERT_WORKING_DIR/ca.crt.pem -s --head
+curl https://hello-world.info --cacert $CERT_WORKING_DIR/ca.crt.pem
+```
+
+### test dynamic persistancy provision
+```
+echo we create a presistant volume claim
+cat <<EOF > persistantVolumeClaim.yaml
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+  name: gluster-claim
+  annotations:
+    volume.beta.kubernetes.io/storage-class: "glusterfs-storage" 
+spec:
+  accessModes:
+  - ReadWriteOnce 
+  resources:
+     requests:
+       storage: 1Gi
+EOF
+kubectl apply -f persistantVolumeClaim.yaml
+kubectl get pvc
+echo we create a pod taht uses it 
+cat <<EOF > training_mysql_pod_volume_dynamic_claim.yaml
+apiVersion: v1
+kind: Pod
+metadata:
+  name: mysql
+  labels:
+    app: mysql
+spec:
+  containers:
+  - name: mysql
+    image: mysql:5.7.35
+    env:
+    - name: MYSQL_ALLOW_EMPTY_PASSWORD
+      value: "yes"
+    ports:
+    - containerPort: 3306
+    volumeMounts:
+    - mountPath: /var/lib/mysql
+      name: mysql-volume
+  volumes:
+  - name: mysql-volume
+    persistentVolumeClaim:
+      claimName: gluster-claim
+EOF
+kubectl apply -f training_mysql_pod_volume_dynamic_claim.yaml
+kubectl get pods
+ echo we add information in the persistant area
+kubectl exec -it mysql -- /bin/bash
+mysql -u root
+create database test;
+show databases;
+quit;
+exit
+echo we test to destroy the pod and start again to verify the persistancy 
+kubectl delete pods mysql
+kubectl delete -f training_mysql_pod_volume_dynamic_claim.yaml
+kubectl get pods
+kubectl apply -f training_mysql_pod_volume_dynamic_claim.yaml
+kubectl get pods
+kubectl exec -it mysql -- /bin/bash
+mysql -u root
+show databases;
+quit;
+exit
+```
+
+
+
 
diff --git a/ansible/17_enable_kadalu_at_management.sh b/ansible/17_enable_kadalu_at_management.sh
deleted file mode 100755
index f7811ba46daed63fd3cdecf4307f1499d0951a8e..0000000000000000000000000000000000000000
--- a/ansible/17_enable_kadalu_at_management.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-set -e
-
-# check if docker-compose is available if it is installed exist
-echo Provisioning ansible...
-
-SCRIPT_DIR=$(dirname "$0")
-cd $SCRIPT_DIR
-
-ansible-playbook enable_kadalu_at_management/site.yaml
diff --git a/ansible/17_install_glusterfs.sh b/ansible/17_install_gluster.sh
similarity index 77%
rename from ansible/17_install_glusterfs.sh
rename to ansible/17_install_gluster.sh
index 65e9bdb9d77efef68f385a06174879f03030701d..93f0a1db351d62b1a77fb55e782544976ef223c1 100755
--- a/ansible/17_install_glusterfs.sh
+++ b/ansible/17_install_gluster.sh
@@ -7,4 +7,4 @@ echo Provisioning ansible...
 SCRIPT_DIR=$(dirname "$0")
 cd $SCRIPT_DIR
 
-ansible-playbook install_glusterfs/site.yaml
+ansible-playbook install_gluster/site.yaml
diff --git a/ansible/A1_clean_kubernetes_docker.sh b/ansible/A1_clean_kubernetes_docker.sh
index 8751f8ca5c03f7582995807e1a7a30c315b2bab7..43b89859c697e502650fc89173d9ae91eaf57057 100755
--- a/ansible/A1_clean_kubernetes_docker.sh
+++ b/ansible/A1_clean_kubernetes_docker.sh
@@ -2,6 +2,6 @@
 set -e
 
 # check if docker-compose is available if it is installed exist
-echo Cleaning Kubernetes...
+echo Cleaning glusterfs device ...
 
 ansible-playbook clean_kubernetes_docker/site.yaml
diff --git a/ansible/A2_clean_gluster.sh b/ansible/A2_clean_gluster.sh
new file mode 100755
index 0000000000000000000000000000000000000000..c2a12750b329292df486983797f65c11a168036c
--- /dev/null
+++ b/ansible/A2_clean_gluster.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+set -e
+
+# check if docker-compose is available if it is installed exist
+echo Cleaning Kubernetes...
+
+ansible-playbook clean_gluster/site.yaml -e "heketi_gluster_storage_device=/dev/sdb"
diff --git a/ansible/B1_setup_and_launch.sh b/ansible/B1_setup_and_launch.sh
index 6176f0e5516f75e336e3abe8deb67caf9dc9f9fd..8c254ef6b175943a4efcd4be5aaf238ba75732ef 100755
--- a/ansible/B1_setup_and_launch.sh
+++ b/ansible/B1_setup_and_launch.sh
@@ -20,3 +20,4 @@ echo no hace falta ./01_add_required_ansible_modules.sh
 ./14_install_metallb.sh
 ./15_install_nginx_ingress.sh
 ./16_install_cert_manager.sh
+./17_install_gluster.sh
\ No newline at end of file
diff --git a/ansible/B2_clear_and_launch.sh b/ansible/B2_clear_and_launch.sh
index 7c22fd2c41464638fbb7a4a687c484bcc02cbb3b..604e03c7e162746079f524b002cf8d218f71987a 100755
--- a/ansible/B2_clear_and_launch.sh
+++ b/ansible/B2_clear_and_launch.sh
@@ -6,18 +6,5 @@ echo setup and launch ...
 
 echo no hace falta ./01_add_required_ansible_modules.sh
 ./A1_clean_kubernetes_docker.sh
-./02_hosts_from_inventory.sh
-./03_upgrade.sh
-./04_epel.sh
-./05_development.sh
-./06_pre_install_kubernetes_kubeadm_docker_checks.sh
-./07_install_kubernetes_kubeadm_docker.sh
-./08_bootstrap_kubernetes_kubeadm.sh
-./09_enable_kubectl.sh
-./10_calico_network_kubernetes.sh
-./11_enable_calicoctl_at_all_kubernetes.sh
-./12_enable_helm.sh
-./13_kubernetes_dashboard.sh
-./14_install_metallb.sh
-./15_install_nginx_ingress.sh
-./16_install_cert_manager.sh
+./A2_clean_gluster.sh
+./B1_setup_and_launch.sh
\ No newline at end of file
diff --git a/ansible/clean_gluster/roles/gluster_clean_dir/tasks/main.yaml b/ansible/clean_gluster/roles/gluster_clean_dir/tasks/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..889d168bffffa3d7a851aca3caacd48e448104c0
--- /dev/null
+++ b/ansible/clean_gluster/roles/gluster_clean_dir/tasks/main.yaml
@@ -0,0 +1,13 @@
+---
+- block:
+    - name: Romove gluster folders
+      file:
+        state: absent
+        path: "{{ item }}"
+      with_items:
+        - /var/lib/heketi
+        - /etc/glusterfs
+        - /var/log/glusterd
+        - /var/lib/glusterd
+      ignore_errors: true 
+  become: yes
diff --git a/ansible/clean_gluster/roles/gluster_clean_lvm/defaults/main.yaml b/ansible/clean_gluster/roles/gluster_clean_lvm/defaults/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..dbdd9a39d6b95ecef4886fa7b5cd17eb8d195280
--- /dev/null
+++ b/ansible/clean_gluster/roles/gluster_clean_lvm/defaults/main.yaml
@@ -0,0 +1,4 @@
+---
+
+gluster_namespace: 'gluster-heketi-ns'
+heketi_gluster_storage_device: "/dev/sdb"
diff --git a/ansible/clean_gluster/roles/gluster_clean_lvm/tasks/main.yaml b/ansible/clean_gluster/roles/gluster_clean_lvm/tasks/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..503d8a42af364e44693c3f96c0204c9477b1569e
--- /dev/null
+++ b/ansible/clean_gluster/roles/gluster_clean_lvm/tasks/main.yaml
@@ -0,0 +1,32 @@
+# https://www.ibm.com/docs/en/cloud-private/3.2.x?topic=glusterfs-reinstalling-cloud-private
+---
+
+- name: "Get names of glusterfs pods"
+  k8s_info:
+    kind: Pod
+    label_selectors:
+      - glusterfs-node=daemonset
+    namespace: "{{ gluster_namespace }}"
+  register: glusterfs_pods
+
+# - debug:
+#     var: glusterfs_pods
+
+- name: "Extract pod names"
+  set_fact:
+    gluster_pod_names: "{{ gluster_pod_names + [ item.metadata.name ] }}"
+  with_items: "{{ glusterfs_pods.resources }}"
+  vars:
+    gluster_pod_names: []
+    
+# - debug:
+#     var: gluster_pod_names
+
+# We are not using community.kubernetes.k8s_exec because this way it is easier to enter afterwards to the pod copying and pasting from the ansible log
+
+- name: "Clear lvm"
+  shell: |    
+    kubectl exec -n {{ gluster_namespace }} {{ item }} -- /bin/bash -c "lvscan 2>/dev/null | grep 'lv_' | awk '{print $2}' | xargs -n 1 lvremove -y 2>/dev/null; vgscan 2>/dev/null | grep 'vg_' | awk '{print $4}' | xargs -n 1 vgremove -y 2>/dev/null; pvremove {{ heketi_gluster_storage_device }} 2>/dev/null"
+  with_items: "{{ gluster_pod_names }}"
+  ignore_errors: true
+
diff --git a/ansible/clean_gluster/roles/gluster_container/defaults/main.yaml b/ansible/clean_gluster/roles/gluster_container/defaults/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..992594843294d8b47ce526c933100d374e803772
--- /dev/null
+++ b/ansible/clean_gluster/roles/gluster_container/defaults/main.yaml
@@ -0,0 +1,19 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+gluster_namespace: 'gluster-heketi-ns'
+
+# Version list:
+# https://github.com/gluster/gluster-containers
+gluster_image: 'gluster/gluster-centos:gluster4u1_centos7'
diff --git a/ansible/clean_gluster/roles/gluster_container/tasks/gluster-patch.yaml b/ansible/clean_gluster/roles/gluster_container/tasks/gluster-patch.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..ba2b9c46a3ae0aff07867e62d3d6ee8d2c332bb7
--- /dev/null
+++ b/ansible/clean_gluster/roles/gluster_container/tasks/gluster-patch.yaml
@@ -0,0 +1,55 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+# Problem: pvs and friends take some minutes to run into timeout
+# in a container where no udev is available.
+
+- name: "Get names of glusterfs pods"
+  k8s_info:
+    kind: Pod
+    label_selectors:
+      - glusterfs-node=daemonset
+    namespace: "{{ gluster_namespace }}"
+  register: glusterfs_pods
+
+# - debug:
+#     var: glusterfs_pods
+
+- name: "Extract pod names"
+  set_fact:
+    gluster_pod_names: "{{ gluster_pod_names + [ item.metadata.name ] }}"
+  with_items: "{{ glusterfs_pods.resources }}"
+  vars:
+    gluster_pod_names: []
+    
+# - debug:
+#     var: gluster_pod_names
+
+# We are not using community.kubernetes.k8s_exec because this way it is easier to enter afterwards to the pod copying and pasting from the ansible log
+
+- name: "Patch /etc/lvm/lvm.config"
+  shell: |    
+    kubectl exec -n {{ gluster_namespace }} {{ item }} -- /bin/bash -c "grep -q 'external_device_info_source = \"none\"' /etc/lvm/lvm.conf && exit 0; sed -i -e 's|external_device_info_source = \"udev\"|external_device_info_source = \"none\"|g' /etc/lvm/lvm.conf; echo CHANGED"
+  with_items: "{{ gluster_pod_names }}"
+  register: patch
+  changed_when: patch.stdout == 'CHANGED'
+
+#  shell: |
+#    kubectl exec -n {{ gluster_namespace }} {{ item }} -- sed -i -e 's|external_device_info_source = "none"|external_device_info_source = "udev"|g' /etc/lvm/lvm.conf
+
+- name: "print patch outcome"
+  debug: 
+    msg: "{{ item.stdout }}"
+  with_items: "{{ patch.results }}"
+  
\ No newline at end of file
diff --git a/ansible/clean_gluster/roles/gluster_container/tasks/install-python-libraries.yaml b/ansible/clean_gluster/roles/gluster_container/tasks/install-python-libraries.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..ea6440c4bb3e82cebfb356ec93f3c58ca050efbc
--- /dev/null
+++ b/ansible/clean_gluster/roles/gluster_container/tasks/install-python-libraries.yaml
@@ -0,0 +1,10 @@
+---
+- block:
+  - name: "Install openshift python lib"
+    pip:
+      name: openshift
+  - name: "Install / Upgrade requests python lib"
+    pip:
+      name: requests
+  become: yes
+    
\ No newline at end of file
diff --git a/ansible/clean_gluster/roles/gluster_container/tasks/k8s-resources.yaml b/ansible/clean_gluster/roles/gluster_container/tasks/k8s-resources.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..adf67f4d42e166ab510baf1b8e86339aea5013eb
--- /dev/null
+++ b/ansible/clean_gluster/roles/gluster_container/tasks/k8s-resources.yaml
@@ -0,0 +1,31 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+- name: "Create gluster heketi namespace"
+  k8s:
+    state: present
+    definition: "{{ lookup('template', 'k8s/namespace.yaml') }}"
+  run_once: true
+
+- name: "Create gluster daemonset"
+  k8s:
+    state: present
+    definition: "{{ lookup('template', 'k8s/gluster-daemonset.yaml') }}"
+    wait: true
+    wait_sleep: 5
+    wait_timeout: 180
+  run_once: true
+
+# ToDo: Unclear if there is the need to wait also for the pods
+#       or if this is already done in deamon-set wait.
diff --git a/ansible/clean_gluster/roles/gluster_container/tasks/main.yaml b/ansible/clean_gluster/roles/gluster_container/tasks/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..65b180c59d3dcdc2e51c04eaf0a09a7eab0f39aa
--- /dev/null
+++ b/ansible/clean_gluster/roles/gluster_container/tasks/main.yaml
@@ -0,0 +1,25 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+# Installs the glusterfs as containers.
+# Note:
+# Even if this works and provides some advantages when it comes
+# to unification of operations and life-cycle-management, there are
+# SOME problems when it comes to run lvm (which relies on udev)
+# inside a container.
+
+- include: install-python-libraries.yaml
+- include: k8s-resources.yaml
+- include: gluster-patch.yaml
+ 
diff --git a/ansible/clean_gluster/roles/gluster_container/templates/k8s/gluster-daemonset.yaml b/ansible/clean_gluster/roles/gluster_container/templates/k8s/gluster-daemonset.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..cc7b7f8c00d7e9a70e62b23ec794b38f27044051
--- /dev/null
+++ b/ansible/clean_gluster/roles/gluster_container/templates/k8s/gluster-daemonset.yaml
@@ -0,0 +1,109 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) contributors of manics/ansible-role-k8s-heketi-gluster
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# This is derivated work. Original
+# https://github.com/manics/ansible-role-k8s-heketi-gluster/blob/master/templates/glusterfs-daemonset.yml.j2
+# also under Apache-2.0 license.
+
+kind: DaemonSet
+apiVersion: apps/v1
+metadata:
+  name: glusterfs
+  namespace: {{ gluster_namespace }}
+  labels:
+    glusterfs: deployment
+  annotations:
+    description: GlusterFS Daemon Set
+    tags: glusterfs
+spec:
+  selector:
+    matchLabels:
+      glusterfs-node: daemonset
+  template:
+    metadata:
+      name: glusterfs
+      labels:
+        glusterfs-node: daemonset
+    spec:
+      tolerations:
+      # this toleration is to have the daemonset runnable on master nodes
+      # remove it if your masters can't run pods
+      - key: node-role.kubernetes.io/master
+        operator: Exists
+        effect: NoSchedule
+      hostNetwork: true
+      containers:
+      - image: {{ gluster_image }}
+        imagePullPolicy: IfNotPresent
+        name: glusterfs
+        volumeMounts:
+        - name: glusterfs-heketi
+          mountPath: "/var/lib/heketi"
+        - name: glusterfs-run
+          mountPath: "/run"
+        - name: glusterfs-lvm
+          mountPath: "/run/lvm"
+        - name: glusterfs-etc
+          mountPath: "/etc/glusterfs"
+        - name: glusterfs-logs
+          mountPath: "/var/log/glusterfs"
+        - name: glusterfs-config
+          mountPath: "/var/lib/glusterd"
+        - name: glusterfs-dev
+          mountPath: "/dev"
+        - name: glusterfs-cgroup
+          mountPath: "/sys/fs/cgroup"
+        securityContext:
+          capabilities: {}
+          privileged: true
+        readinessProbe:
+          timeoutSeconds: 3
+          initialDelaySeconds: 60
+          exec:
+            command:
+            - "/bin/bash"
+            - "-c"
+            - systemctl status glusterd.service
+        livenessProbe:
+          timeoutSeconds: 3
+          initialDelaySeconds: 60
+          exec:
+            command:
+            - "/bin/bash"
+            - "-c"
+            - systemctl status glusterd.service
+      volumes:
+      - name: glusterfs-heketi
+        hostPath:
+          path: "/var/lib/heketi"
+      - name: glusterfs-run
+      - name: glusterfs-lvm
+        hostPath:
+          path: "/run/lvm"
+      - name: glusterfs-etc
+        hostPath:
+          path: "/etc/glusterfs"
+      - name: glusterfs-logs
+        hostPath:
+          path: "/var/log/glusterfs"
+      - name: glusterfs-config
+        hostPath:
+          path: "/var/lib/glusterd"
+      - name: glusterfs-dev
+        hostPath:
+          path: "/dev"
+      - name: glusterfs-cgroup
+        hostPath:
+          path: "/sys/fs/cgroup"
diff --git a/ansible/clean_gluster/roles/gluster_container/templates/k8s/namespace.yaml b/ansible/clean_gluster/roles/gluster_container/templates/k8s/namespace.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..0b0968d9ce89c6af3fea19ba252782db3d4a0506
--- /dev/null
+++ b/ansible/clean_gluster/roles/gluster_container/templates/k8s/namespace.yaml
@@ -0,0 +1,20 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+kind: Namespace
+api_version: v1
+metadata:
+  name: "{{ gluster_namespace }}"
+  labels:
+    name: "{{ gluster_namespace }}"
diff --git a/ansible/clean_gluster/roles/gluster_device_wipefs/defaults/main.yaml b/ansible/clean_gluster/roles/gluster_device_wipefs/defaults/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..1887f0968bbed87abf775cc1c9129e208251d53f
--- /dev/null
+++ b/ansible/clean_gluster/roles/gluster_device_wipefs/defaults/main.yaml
@@ -0,0 +1,3 @@
+---
+
+heketi_gluster_storage_device: "/dev/sdb"
diff --git a/ansible/clean_gluster/roles/gluster_device_wipefs/tasks/main.yaml b/ansible/clean_gluster/roles/gluster_device_wipefs/tasks/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..0831cd67fc483610b925275dfa15b126f93b4a24
--- /dev/null
+++ b/ansible/clean_gluster/roles/gluster_device_wipefs/tasks/main.yaml
@@ -0,0 +1,15 @@
+# https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/
+---
+- block:
+    - name: Wipe devices
+      shell: |
+        wipefs --all --force {{ heketi_gluster_storage_device }} 
+      register: wipe
+      changed_when: wipe.stdout != ''
+      ignore_errors: true 
+
+    - name: "wipefs command output"
+      debug:
+        msg: "{{ wipe.stdout_lines }}"
+
+  become: yes
\ No newline at end of file
diff --git a/ansible/clean_gluster/roles/gluster_kubernetes_clean/defaults/main.yaml b/ansible/clean_gluster/roles/gluster_kubernetes_clean/defaults/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..4cba4a1ad94ea33ff2aa443d54941d98ed95deeb
--- /dev/null
+++ b/ansible/clean_gluster/roles/gluster_kubernetes_clean/defaults/main.yaml
@@ -0,0 +1,2 @@
+---
+heketi_namespace: 'gluster-heketi-ns'
diff --git a/ansible/clean_gluster/roles/gluster_kubernetes_clean/tasks/main.yaml b/ansible/clean_gluster/roles/gluster_kubernetes_clean/tasks/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..435e0a3de231fc10ee5c9cc26cd0493dccf52488
--- /dev/null
+++ b/ansible/clean_gluster/roles/gluster_kubernetes_clean/tasks/main.yaml
@@ -0,0 +1,10 @@
+---
+- name: "remove heketi namespace"
+  shell: >-
+    kubectl delete ns {{ heketi_namespace }}
+  ignore_errors: true 
+
+- name: "remove storage class"
+  shell: >-
+    kubectl delete sc glusterfs-storage
+  ignore_errors: true 
diff --git a/ansible/clean_gluster/site.yaml b/ansible/clean_gluster/site.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..6fbe9885975e8ea4544fcd120edbc1e12579b13f
--- /dev/null
+++ b/ansible/clean_gluster/site.yaml
@@ -0,0 +1,36 @@
+# https://www.ibm.com/docs/en/cloud-private/3.2.x?topic=glusterfs-reinstalling-cloud-private
+
+- hosts: localhost
+  roles:
+    - name: gluster_kubernetes_clean
+
+- hosts: all_kubernetes_servers
+  roles:
+    - name: gluster_clean_dir
+
+#- hosts: localhost
+#  roles:
+#    - name: gluster_container
+
+#- hosts: localhost
+#  roles:
+#    - name: gluster_clean_lvm
+
+#- hosts: localhost
+#  roles:
+#    - name: gluster_kubernetes_clean
+   
+- hosts: all_kubernetes_servers
+  roles:
+    - name: gluster_device_wipefs
+
+- hosts: all_kubernetes_servers
+  tasks:
+    - name: reboot
+      reboot:
+      become: true
+
+# I erase second time in case of
+- hosts: all_kubernetes_servers
+  roles:
+    - name: gluster_device_wipefs
diff --git a/ansible/clean_kubernetes_docker/roles/clean-kubernetes/files/clean-kubernetes b/ansible/clean_kubernetes_docker/roles/clean_kubernetes/files/clean-kubernetes
similarity index 100%
rename from ansible/clean_kubernetes_docker/roles/clean-kubernetes/files/clean-kubernetes
rename to ansible/clean_kubernetes_docker/roles/clean_kubernetes/files/clean-kubernetes
diff --git a/ansible/clean_kubernetes_docker/roles/clean-kubernetes/tasks/main.yaml b/ansible/clean_kubernetes_docker/roles/clean_kubernetes/tasks/main.yaml
similarity index 100%
rename from ansible/clean_kubernetes_docker/roles/clean-kubernetes/tasks/main.yaml
rename to ansible/clean_kubernetes_docker/roles/clean_kubernetes/tasks/main.yaml
diff --git a/ansible/clean_kubernetes_docker/site.yaml b/ansible/clean_kubernetes_docker/site.yaml
index af664f164718e80dad01b5314d469c8f7e17104d..5e39091f6b7ad4e6b544b42e13b231709b01ee8b 100755
--- a/ansible/clean_kubernetes_docker/site.yaml
+++ b/ansible/clean_kubernetes_docker/site.yaml
@@ -2,4 +2,4 @@
 ---
 - hosts: all_kubernetes_servers
   roles:
-    - name: clean-kubernetes
+    - name: clean_kubernetes
diff --git a/ansible/enable_kadalu_at_management/roles/kadalu/tasks/main.yaml b/ansible/enable_kadalu_at_management/roles/kadalu/tasks/main.yaml
deleted file mode 100755
index 89f4459f88b84a74bb5b884c0b11604c0ae1ea93..0000000000000000000000000000000000000000
--- a/ansible/enable_kadalu_at_management/roles/kadalu/tasks/main.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-# https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/
----
-- block:
-  - name: downloading {{ kadalu_url }} to {{ kadalu_target }}
-    become: yes
-    become_user: root
-    get_url:
-      url: '{{ kadalu_url }}'
-      dest: '{{ kadalu_target }}'
-      mode: 0755
-  become: yes
-
diff --git a/ansible/enable_kadalu_at_management/roles/kadalu/vars/main.yaml b/ansible/enable_kadalu_at_management/roles/kadalu/vars/main.yaml
deleted file mode 100755
index f50fa5965b5fb4b84458655c2a53d774a250badb..0000000000000000000000000000000000000000
--- a/ansible/enable_kadalu_at_management/roles/kadalu/vars/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-kadalu_url: https://github.com/kadalu/kadalu/releases/download/0.8.2/kubectl-kadalu
-kadalu_target: /usr/local/bin
\ No newline at end of file
diff --git a/ansible/enable_kadalu_at_management/site.yaml b/ansible/enable_kadalu_at_management/site.yaml
deleted file mode 100755
index da93af3fcdf88aa9c85d003322124d131905f2dc..0000000000000000000000000000000000000000
--- a/ansible/enable_kadalu_at_management/site.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-# modified from https://github.com/danpilch/easy-kubeadm
----
-- hosts: localhost
-  roles:
-    - name: kadalu
-    
diff --git a/ansible/install_gluster/roles/ensure_gluster_fs_client/tasks/main.yaml b/ansible/install_gluster/roles/ensure_gluster_fs_client/tasks/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..86aaa949ec0af1d560c843efb4f8cd9aefb1da27
--- /dev/null
+++ b/ansible/install_gluster/roles/ensure_gluster_fs_client/tasks/main.yaml
@@ -0,0 +1,9 @@
+# https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/
+---
+- block:
+    - name: Install gluster client packages
+      dnf:
+        name:
+          - glusterfs-client
+        state: present # latest provokes error
+  become: yes
\ No newline at end of file
diff --git a/ansible/install_gluster/roles/gluster_container/defaults/main.yaml b/ansible/install_gluster/roles/gluster_container/defaults/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..992594843294d8b47ce526c933100d374e803772
--- /dev/null
+++ b/ansible/install_gluster/roles/gluster_container/defaults/main.yaml
@@ -0,0 +1,19 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+gluster_namespace: 'gluster-heketi-ns'
+
+# Version list:
+# https://github.com/gluster/gluster-containers
+gluster_image: 'gluster/gluster-centos:gluster4u1_centos7'
diff --git a/ansible/install_gluster/roles/gluster_container/tasks/gluster-patch.yaml b/ansible/install_gluster/roles/gluster_container/tasks/gluster-patch.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..b1d3c3c278d5221a6d599bddae9c22a99ddb021d
--- /dev/null
+++ b/ansible/install_gluster/roles/gluster_container/tasks/gluster-patch.yaml
@@ -0,0 +1,69 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+# Problem: pvs and friends take some minutes to run into timeout
+# in a container where no udev is available.
+
+- name: "Get names of glusterfs pods"
+  k8s_info:
+    kind: Pod
+    label_selectors:
+      - glusterfs-node=daemonset
+    namespace: "{{ gluster_namespace }}"
+  register: glusterfs_pods
+
+# - debug:
+#     var: glusterfs_pods
+
+- name: "Extract pod names"
+  set_fact:
+    gluster_pod_names: "{{ gluster_pod_names + [ item.metadata.name ] }}"
+  with_items: "{{ glusterfs_pods.resources }}"
+  vars:
+    gluster_pod_names: []
+    
+# - debug:
+#     var: gluster_pod_names
+
+# We are not using community.kubernetes.k8s_exec because this way it is easier to enter afterwards to the pod copying and pasting from the ansible log
+
+- name: "Patch external_device_info_source /etc/lvm/lvm.config"
+  shell: |    
+    kubectl exec -n {{ gluster_namespace }} {{ item }} -- /bin/bash -c "grep -q 'external_device_info_source = \"none\"' /etc/lvm/lvm.conf && exit 0; sed -i -e 's|external_device_info_source = \"udev\"|external_device_info_source = \"none\"|g' /etc/lvm/lvm.conf; echo CHANGED"
+  with_items: "{{ gluster_pod_names }}"
+  register: patch
+  changed_when: patch.stdout == 'CHANGED'
+
+- name: "Patch multipath_component_detection /etc/lvm/lvm.config"
+  shell: |    
+    kubectl exec -n {{ gluster_namespace }} {{ item }} -- /bin/bash -c "grep -q 'multipath_component_detection = 0' /etc/lvm/lvm.conf && exit 0; sed -i -e 's|multipath_component_detection = 1| multipath_component_detection = 0|g' /etc/lvm/lvm.conf; echo CHANGED"
+  with_items: "{{ gluster_pod_names }}"
+  register: patch
+  changed_when: patch.stdout == 'CHANGED'
+
+- name: "Patch md_component_detection /etc/lvm/lvm.config"
+  shell: |    
+    kubectl exec -n {{ gluster_namespace }} {{ item }} -- /bin/bash -c "grep -q 'md_component_detection = 0' /etc/lvm/lvm.conf && exit 0; sed -i -e 's|md_component_detection = 1|md_component_detection = 0|g' /etc/lvm/lvm.conf; echo CHANGED"
+  with_items: "{{ gluster_pod_names }}"
+  register: patch
+  changed_when: patch.stdout == 'CHANGED'
+
+#  shell: |
+#    kubectl exec -n {{ gluster_namespace }} {{ item }} -- sed -i -e 's|external_device_info_source = "none"|external_device_info_source = "udev"|g' /etc/lvm/lvm.conf
+
+- name: "print patch outcome"
+  debug: 
+    msg: "{{ item.stdout }}"
+  with_items: "{{ patch.results }}"
+  
\ No newline at end of file
diff --git a/ansible/install_gluster/roles/gluster_container/tasks/install-python-libraries.yaml b/ansible/install_gluster/roles/gluster_container/tasks/install-python-libraries.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..ea6440c4bb3e82cebfb356ec93f3c58ca050efbc
--- /dev/null
+++ b/ansible/install_gluster/roles/gluster_container/tasks/install-python-libraries.yaml
@@ -0,0 +1,10 @@
+---
+- block:
+  - name: "Install openshift python lib"
+    pip:
+      name: openshift
+  - name: "Install / Upgrade requests python lib"
+    pip:
+      name: requests
+  become: yes
+    
\ No newline at end of file
diff --git a/ansible/install_gluster/roles/gluster_container/tasks/k8s-resources.yaml b/ansible/install_gluster/roles/gluster_container/tasks/k8s-resources.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..43d0ffadf6a50a7748de6ae1c6e22612e0559b30
--- /dev/null
+++ b/ansible/install_gluster/roles/gluster_container/tasks/k8s-resources.yaml
@@ -0,0 +1,34 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+- name: "Create gluster heketi namespace"
+  k8s:
+    state: present
+    definition: "{{ lookup('template', 'k8s/namespace.yaml') }}"
+  register: heketi_service_endpoint 
+  retries: 5
+  delay: 10
+  until: heketi_service_endpoint is not failed
+
+- name: "Create gluster daemonset"
+  k8s:
+    state: present
+    definition: "{{ lookup('template', 'k8s/gluster-daemonset.yaml') }}"
+    wait: true
+    wait_sleep: 5
+    wait_timeout: 180
+  run_once: true
+
+# ToDo: Unclear if there is the need to wait also for the pods
+#       or if this is already done in deamon-set wait.
diff --git a/ansible/install_gluster/roles/gluster_container/tasks/main.yaml b/ansible/install_gluster/roles/gluster_container/tasks/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..65b180c59d3dcdc2e51c04eaf0a09a7eab0f39aa
--- /dev/null
+++ b/ansible/install_gluster/roles/gluster_container/tasks/main.yaml
@@ -0,0 +1,25 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+# Installs the glusterfs as containers.
+# Note:
+# Even if this works and provides some advantages when it comes
+# to unification of operations and life-cycle-management, there are
+# SOME problems when it comes to run lvm (which relies on udev)
+# inside a container.
+
+- include: install-python-libraries.yaml
+- include: k8s-resources.yaml
+- include: gluster-patch.yaml
+ 
diff --git a/ansible/install_gluster/roles/gluster_container/templates/k8s/gluster-daemonset.yaml b/ansible/install_gluster/roles/gluster_container/templates/k8s/gluster-daemonset.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..cc7b7f8c00d7e9a70e62b23ec794b38f27044051
--- /dev/null
+++ b/ansible/install_gluster/roles/gluster_container/templates/k8s/gluster-daemonset.yaml
@@ -0,0 +1,109 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) contributors of manics/ansible-role-k8s-heketi-gluster
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# This is derivated work. Original
+# https://github.com/manics/ansible-role-k8s-heketi-gluster/blob/master/templates/glusterfs-daemonset.yml.j2
+# also under Apache-2.0 license.
+
+kind: DaemonSet
+apiVersion: apps/v1
+metadata:
+  name: glusterfs
+  namespace: {{ gluster_namespace }}
+  labels:
+    glusterfs: deployment
+  annotations:
+    description: GlusterFS Daemon Set
+    tags: glusterfs
+spec:
+  selector:
+    matchLabels:
+      glusterfs-node: daemonset
+  template:
+    metadata:
+      name: glusterfs
+      labels:
+        glusterfs-node: daemonset
+    spec:
+      tolerations:
+      # this toleration is to have the daemonset runnable on master nodes
+      # remove it if your masters can't run pods
+      - key: node-role.kubernetes.io/master
+        operator: Exists
+        effect: NoSchedule
+      hostNetwork: true
+      containers:
+      - image: {{ gluster_image }}
+        imagePullPolicy: IfNotPresent
+        name: glusterfs
+        volumeMounts:
+        - name: glusterfs-heketi
+          mountPath: "/var/lib/heketi"
+        - name: glusterfs-run
+          mountPath: "/run"
+        - name: glusterfs-lvm
+          mountPath: "/run/lvm"
+        - name: glusterfs-etc
+          mountPath: "/etc/glusterfs"
+        - name: glusterfs-logs
+          mountPath: "/var/log/glusterfs"
+        - name: glusterfs-config
+          mountPath: "/var/lib/glusterd"
+        - name: glusterfs-dev
+          mountPath: "/dev"
+        - name: glusterfs-cgroup
+          mountPath: "/sys/fs/cgroup"
+        securityContext:
+          capabilities: {}
+          privileged: true
+        readinessProbe:
+          timeoutSeconds: 3
+          initialDelaySeconds: 60
+          exec:
+            command:
+            - "/bin/bash"
+            - "-c"
+            - systemctl status glusterd.service
+        livenessProbe:
+          timeoutSeconds: 3
+          initialDelaySeconds: 60
+          exec:
+            command:
+            - "/bin/bash"
+            - "-c"
+            - systemctl status glusterd.service
+      volumes:
+      - name: glusterfs-heketi
+        hostPath:
+          path: "/var/lib/heketi"
+      - name: glusterfs-run
+      - name: glusterfs-lvm
+        hostPath:
+          path: "/run/lvm"
+      - name: glusterfs-etc
+        hostPath:
+          path: "/etc/glusterfs"
+      - name: glusterfs-logs
+        hostPath:
+          path: "/var/log/glusterfs"
+      - name: glusterfs-config
+        hostPath:
+          path: "/var/lib/glusterd"
+      - name: glusterfs-dev
+        hostPath:
+          path: "/dev"
+      - name: glusterfs-cgroup
+        hostPath:
+          path: "/sys/fs/cgroup"
diff --git a/ansible/install_gluster/roles/gluster_container/templates/k8s/namespace.yaml b/ansible/install_gluster/roles/gluster_container/templates/k8s/namespace.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..0b0968d9ce89c6af3fea19ba252782db3d4a0506
--- /dev/null
+++ b/ansible/install_gluster/roles/gluster_container/templates/k8s/namespace.yaml
@@ -0,0 +1,20 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+kind: Namespace
+api_version: v1
+metadata:
+  name: "{{ gluster_namespace }}"
+  labels:
+    name: "{{ gluster_namespace }}"
diff --git a/ansible/install_gluster/roles/gluster_get_hosts/defaults/main.yaml b/ansible/install_gluster/roles/gluster_get_hosts/defaults/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..5a7e2449b7c7a6e69284c33bd72677b28ff47adf
--- /dev/null
+++ b/ansible/install_gluster/roles/gluster_get_hosts/defaults/main.yaml
@@ -0,0 +1,15 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+gluster_namespace: 'gluster-heketi-ns'
diff --git a/ansible/install_gluster/roles/gluster_get_hosts/tasks/main.yaml b/ansible/install_gluster/roles/gluster_get_hosts/tasks/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..d093c4edbd2d1362e08551a22082d9c207073965
--- /dev/null
+++ b/ansible/install_gluster/roles/gluster_get_hosts/tasks/main.yaml
@@ -0,0 +1,63 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) contributors of manics/ansible-role-k8s-heketi-gluster
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# This is derivated work. Original
+# https://github.com/manics/ansible-role-k8s-heketi-gluster/blob/master/tasks/heketi.yml
+# also under Apache-2.0 license.
+
+# Set the 'output' variables of the gluster installation
+
+- name: "Retrieve gluster-pod IPs"
+  command: >
+    kubectl get pods
+    --namespace={{ gluster_namespace }}
+    -o jsonpath='{.items[?(@.spec.containers[*].name=="glusterfs")].status.podIP}'
+  changed_when: false
+  register: get_ips
+  run_once: true
+
+- name: "Set fact endpoint_list"
+  set_fact:
+    endpoint_list: "[\"{{get_ips.stdout | replace(' ','\",\"')}}\"]"
+  run_once: true
+
+- name: "Retrieve gluster-server nodenames"
+  command: >
+    kubectl get pods
+    --namespace={{ gluster_namespace }}
+    -o jsonpath='{.items[?(@.spec.containers[*].name=="glusterfs")].spec.nodeName}'
+  changed_when: false
+  register: get_nodenames
+  run_once: true
+
+- name: "Set fact host_list"
+  set_fact:
+    host_list: "[\"{{get_nodenames.stdout | replace(' ','\",\"')}}\"]"
+  run_once: true
+
+- name: "Combine host-list with endpoint-list"
+  set_fact:
+    gluster_host_ips: "{{ gluster_host_ips | combine({item.0: item.1}) }}"
+  with_together:
+    - "{{ host_list }}"
+    - "{{ endpoint_list }}"
+  vars:
+    gluster_host_ips: {}
+  run_once: true
+
+- name: "Output list"
+  debug:
+    var: gluster_host_ips
+  run_once: true
\ No newline at end of file
diff --git a/ansible/install_gluster/roles/gluster_modules/defaults/main.yaml b/ansible/install_gluster/roles/gluster_modules/defaults/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..e1f3e9a77c5718544b63f7c24db33855a28af28a
--- /dev/null
+++ b/ansible/install_gluster/roles/gluster_modules/defaults/main.yaml
@@ -0,0 +1,23 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+gluster_kernel_modules:
+  - 'target_core_file'
+  - 'target_core_pscsi'
+  - 'target_core_mod'
+  - 'target_core_iblock'
+  - 'target_core_user'
+  - 'dm_snapshot'
+  - 'dm_mirror'
+  - 'dm_thin_pool'
diff --git a/ansible/install_gluster/roles/gluster_modules/tasks/main.yaml b/ansible/install_gluster/roles/gluster_modules/tasks/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..4d69b651797476d7e7bed2aae45109239bd32420
--- /dev/null
+++ b/ansible/install_gluster/roles/gluster_modules/tasks/main.yaml
@@ -0,0 +1,15 @@
+---
+- block:
+  - name: "Load kernel modules needed by gluster"
+    modprobe:
+      name: "{{ item }}"
+    loop: "{{ gluster_kernel_modules }}"
+      
+  - name: "Make kernel modules that are needed by gluster persistent"
+    lineinfile:
+      path: /etc/modules-load.d/gluster.conf
+      regexp: "^{{ item }}$"
+      line: "{{ item }}"
+      create: yes
+    loop: "{{ gluster_kernel_modules }}"
+  become: yes
\ No newline at end of file
diff --git a/ansible/install_gluster/roles/heketi/defaults/main.yaml b/ansible/install_gluster/roles/heketi/defaults/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..1be2b54a1077c18dfffb1106afec30b851a66a90
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi/defaults/main.yaml
@@ -0,0 +1,29 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+heketi_namespace: 'gluster-heketi-ns'
+# heketi_storage_namespace: 'storage-heketi-ns'
+
+# Heketi container image
+# Info: https://hub.docker.com/r/heketi/heketi
+heketi_image: "heketi/heketi:dev"
+
+# User Token / Keys
+# XXX ToDo: create new one for each run
+# XXX ToDo: secret one
+heketi_user_key: user-key-934
+heketi_admin_key: admin-key-934
+
+# not sure if this value is needed
+heketi_executor: 'kubernetes'
\ No newline at end of file
diff --git a/ansible/install_gluster/roles/heketi/tasks/main.yaml b/ansible/install_gluster/roles/heketi/tasks/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..5d6261771137650858d6197adb54e5d2f8ceedaf
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi/tasks/main.yaml
@@ -0,0 +1,41 @@
+---
+
+- name: "Create heketi service"
+  k8s:
+    state: present
+    definition: "{{ lookup('template', 'k8s/final-service.yaml') }}"
+
+- name: "Create heketi deployment"
+  k8s:
+    state: present
+    definition: "{{ lookup('template', 'k8s/final-deployment.yaml') }}"
+
+- name: "Get endpoint"
+  shell: kubectl describe -n gluster-heketi-ns svc/heketi | grep "Endpoints:" | awk '{print $2}'
+  register: heketi_service_endpoint 
+  retries: 5
+  delay: 10
+  until: heketi_service_endpoint.stdout != '<none>'
+
+- debug:
+    msg: "{{ heketi_service_endpoint.stdout }}"
+
+# Create storage class tasks fails if it is already available
+# even if there is no change.
+# Therefore check, if the resource is available beforehand.
+
+- name: "Check if storage class is already available"
+  k8s_info:
+    kind: StorageClass
+    name: glusterfs-storage
+  register: storage_class_check
+  ignore_errors: true
+
+- debug:
+    var: storage_class_check
+
+- name: "Create storage class"
+  k8s:
+    state: present
+    definition: "{{ lookup('template', 'k8s/final-storage-class.yaml') }}"
+  when: storage_class_check.resources | length == 0
\ No newline at end of file
diff --git a/ansible/install_gluster/roles/heketi/templates/k8s/final-deployment.yaml b/ansible/install_gluster/roles/heketi/templates/k8s/final-deployment.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..9f5b4ced9e080109cbca791b7a3c21f907ccf2ce
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi/templates/k8s/final-deployment.yaml
@@ -0,0 +1,83 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+kind: Deployment
+apiVersion: apps/v1
+metadata:
+  name: heketi
+  namespace: "{{ heketi_namespace }}"
+  labels:
+    glusterfs: heketi-deployment
+    heketi: deployment
+  annotations:
+    description: Defines how to deploy Heketi
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      name: heketi
+  template:
+    metadata:
+      name: heketi
+      labels:
+        name: heketi
+        glusterfs: heketi-pod
+    spec:
+      serviceAccountName: heketi-service-account
+      containers:
+      - image: "{{ heketi_image }}"
+        imagePullPolicy: IfNotPresent
+        name: heketi
+        env:
+          - name: HEKETI_USER_KEY
+            value: "{{ heketi_user_key }}"
+          - name: HEKETI_ADMIN_KEY
+            value: "{{ heketi_admin_key }}"
+          - name: HEKETI_EXECUTOR
+            value: "{{ heketi_executor }}"
+          - name: HEKETI_KUBE_NAMESPACE
+            value: "{{ heketi_namespace }}"
+          - name: HEKETI_FSTAB
+            value: /var/lib/heketi/fstab
+          - name: HEKETI_SNAPSHOT_LIMIT
+            value: "14"
+          - name: HEKETI_KUBE_GLUSTER_DAEMONSET
+            value: "y"
+        ports:
+          - containerPort: 8080
+        volumeMounts:
+          - name: db
+            mountPath: "/var/lib/heketi"
+          - name: config
+            mountPath: /etc/heketi
+        readinessProbe:
+          timeoutSeconds: 3
+          initialDelaySeconds: 3
+          httpGet:
+            path: /hello
+            port: 8080
+        livenessProbe:
+          timeoutSeconds: 3
+          initialDelaySeconds: 30
+          httpGet:
+            path: /hello
+            port: 8080
+      volumes:
+        - name: db
+          glusterfs:
+            endpoints: heketi-storage-endpoints
+            path: heketidbstorage
+        - name: config
+          secret:
+            secretName: heketi-config-secret
diff --git a/ansible/install_gluster/roles/heketi/templates/k8s/final-service.yaml b/ansible/install_gluster/roles/heketi/templates/k8s/final-service.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..4051ca59ed7d232676aba6c22736be9a92f2f1ab
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi/templates/k8s/final-service.yaml
@@ -0,0 +1,32 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+kind: Service
+apiVersion: v1
+metadata:
+  name: heketi
+  namespace: "{{ heketi_namespace }}"
+  labels:
+    glusterfs: heketi-service
+    heketi-deployer: support
+    heketi: service
+  annotations:
+    description: Exposes Heketi Service
+spec:
+  selector:
+    name: heketi
+  ports:
+  - name: heketi
+    port: 8080
+    targetPort: 8080
diff --git a/ansible/install_gluster/roles/heketi/templates/k8s/final-storage-class.yaml b/ansible/install_gluster/roles/heketi/templates/k8s/final-storage-class.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..bc4f842067d81a173348378bd7c98706fa984b96
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi/templates/k8s/final-storage-class.yaml
@@ -0,0 +1,35 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+# This should work as a user - but there is currently a problem with
+# this.
+# Error message:
+# failed to create volume: Administrator access required
+# See e.g.:
+# https://github.com/heketi/heketi/issues/1329
+
+apiVersion: storage.k8s.io/v1beta1
+kind: StorageClass
+metadata:
+  name: glusterfs-storage
+  annotations:
+    storageclass.kubernetes.io/is-default-class: "true"
+provisioner: kubernetes.io/glusterfs
+parameters:
+  resturl: "http://{{ heketi_service_endpoint.stdout }}"
+  restuser: admin
+  restuserkey: "{{ heketi_admin_key }}"
+
+#  restuser: user
+#  restuserkey: "{{ heketi_user_key }}"
diff --git a/ansible/install_gluster/roles/heketi_config/defaults/main.yaml b/ansible/install_gluster/roles/heketi_config/defaults/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..14c4e8c25afd4d55eaf51c1807ef06f83abb80a4
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_config/defaults/main.yaml
@@ -0,0 +1,11 @@
+# Directory where to place config files, e.g. the topology file.
+heketi_config_dir: "/tmp/k8s-gluster-heketi-ansible"
+
+# User Token / Keys
+# XXX ToDo: create new one for each run
+# XXX ToDo: secret one
+heketi_user_key: user-key-934
+heketi_admin_key: admin-key-934
+
+# not sure if this value is needed
+heketi_executor: 'kubernetes'
diff --git a/ansible/install_gluster/roles/heketi_config/tasks/main.yaml b/ansible/install_gluster/roles/heketi_config/tasks/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..56c53f7af3e9cb26077912f724f489929390b3d4
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_config/tasks/main.yaml
@@ -0,0 +1,32 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+# Common thingies for the heketi installation
+
+- name: "Create local dir for file detemplation"
+  file:
+    state: directory
+    path: "{{ heketi_config_dir }}"
+    mode: '0755'
+
+- name: "Create heketi.json file locally"
+  template:
+    src: heketi.json
+    dest: "{{ heketi_config_dir }}/heketi.json"
+
+- name: "Encode heketi.json"
+  set_fact:
+    heketi_json_base64: "{{ item | string | b64encode }}"
+  with_file:
+    - "{{ heketi_config_dir }}/heketi.json"
diff --git a/ansible/install_gluster/roles/heketi_config/templates/heketi.json b/ansible/install_gluster/roles/heketi_config/templates/heketi.json
new file mode 100755
index 0000000000000000000000000000000000000000..d188163643a43ec9e97c657a7b5206b69b09ad76
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_config/templates/heketi.json
@@ -0,0 +1,38 @@
+{
+    "_copyright":
+    "This file is part of the k8s-gluster-heketi-ansible project,\nan ansible collection to install glusterfs and heketi into\nkubernetes to provide dynamic persistent volumes.\n\n(c) 2020 Andreas Florath, Deutsche Telekom AG\n\nBy default all files of this project are licensed under the Apache-2.0\nlicense. For details see the file 'LICENSE' in the top directory.\nhttps://opensource.org/licenses/Apache-2.0\n\nSPDX-License-Identifier: Apache-2.0\n",
+
+    "_port_comment": "Heketi Server Port Number",
+    "port" : "8080",
+
+    "_use_auth": "Enable JWT authorization. Please enable for deployment",
+    "use_auth" : true,
+
+    "_jwt" : "Private keys for access",
+    "jwt" : {
+        "_admin" : "Admin has access to all APIs",
+        "admin" : {
+            "key" : "{{ heketi_admin_key }}"
+        },
+        "_user" : "User only has access to /volumes endpoint",
+        "user" : {
+            "key" : "{{ heketi_user_key }}"
+        }
+    },
+
+    "_glusterfs_comment": "GlusterFS Configuration",
+    "glusterfs" : {
+
+        "_executor_comment": "Execute plugin. Possible choices: mock, kubernetes, ssh",
+        "executor" : "{{ heketi_executor }}",
+
+        "_db_comment": "Database file name",
+        "db" : "/var/lib/heketi/heketi.db",
+
+        "kubeexec" : {
+            "rebalance_on_expansion": true
+        }
+    },
+
+    "backup_db_to_kube_secret": false
+}
diff --git a/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/defaults/main.yaml b/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/defaults/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..cb10b4c331118c209c6f4dfef8ba04d3a7caf512
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/defaults/main.yaml
@@ -0,0 +1,35 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+heketi_gluster_storage_device: "/dev/sdb"
+
+# Directory where to place config files, e.g. the topology file.
+heketi_config_dir: "/tmp/k8s-gluster-heketi-ansible"
+
+heketi_namespace: 'gluster-heketi-ns'
+# heketi_storage_namespace: 'storage-heketi-ns'
+
+# Heketi container image
+# Info: https://hub.docker.com/r/heketi/heketi
+heketi_image: "heketi/heketi:dev"
+
+# Heketi client
+# Info: https://github.com/heketi/heketi/releases/
+heketi_client_url: "https://github.com/heketi/heketi/releases/download/v9.0.0/heketi-client-v9.0.0.linux.amd64.tar.gz"
+
+# User Token / Keys
+# XXX ToDo: create new one for each run
+# XXX ToDo: secret one
+heketi_user_key: user-key-934
+heketi_admin_key: admin-key-934
diff --git a/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/tasks/heketi-copy-heketi-db-into-gluster-volume.yaml b/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/tasks/heketi-copy-heketi-db-into-gluster-volume.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..5e2c797c336bad8f168eb4b54141df3fb7df88fa
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/tasks/heketi-copy-heketi-db-into-gluster-volume.yaml
@@ -0,0 +1,39 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+# Preconditions: the file "{{ heketi_config_dir }}/heketi-storage.json" must
+#   exists and contains a valid kubernetes resource definition
+# The problem here is, that this cannot just be used for the final
+# deployment for different reasons, e.g. missing namespaces of the resources.
+# Therefore the needed data is extraced and used for the new resources.
+
+- name: "Create heketi secret for COPY task"
+  k8s:
+    state: present
+    definition: "{{ lookup('template', 'k8s/copy-secret.yaml') }}"
+
+- name: "Create heketi endpoints for COPY task"
+  k8s:
+    state: present
+    definition: "{{ lookup('template', 'k8s/copy-endpoints.yaml') }}"
+
+- name: "Create heketi service for COPY task"
+  k8s:
+    state: present
+    definition: "{{ lookup('template', 'k8s/copy-service.yaml') }}"
+
+- name: "Create heketi job for COPY task"
+  k8s:
+    state: present
+    definition: "{{ lookup('template', 'k8s/copy-job.yaml') }}"
diff --git a/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/tasks/heketi-download-heketi-storage.yaml b/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/tasks/heketi-download-heketi-storage.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..fda8c862484684ba7c6cfd190299c269eefa4b78
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/tasks/heketi-download-heketi-storage.yaml
@@ -0,0 +1,4 @@
+---
+- name: "Download heketi storage file"
+  shell: |    
+    kubectl cp {{ heketi_namespace }}/{{ heketi_pod_name }}:/var/lib/heketi/heketi-storage.json {{ temp_directory.path }}/heketi-storage.json 
diff --git a/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/tasks/heketi-get-heketi-db-raw.yaml b/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/tasks/heketi-get-heketi-db-raw.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..cfaa1c38ea239c5ab1cd52b9497e6ce89c3585a4
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/tasks/heketi-get-heketi-db-raw.yaml
@@ -0,0 +1,16 @@
+---
+
+- name: Get heketi storage as json
+  set_fact:
+    heketi_storage_json: "{{ lookup('file','{{ temp_directory.path }}/heketi-storage.json') | from_json }}"
+
+- name: Get heketi db raw
+  set_fact:
+    heketi_db_raw: "{{ heketi_storage_json | json_query('items[0].data.\"heketi.db\"') }}"
+
+- name: Print out heketi_db
+  debug:
+    msg: "{{ heketi_db_raw }}"
+
+#  shell: jq -r '.items[0]["data"]["heketi.db"]' "{{ heketi_config_dir }}/heketi-storage.json"
+#  register: heketi_db_raw
diff --git a/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/tasks/install-python-libraries.yaml b/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/tasks/install-python-libraries.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..4286c219618a3ed6c90ee92239927b22c3563a7b
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/tasks/install-python-libraries.yaml
@@ -0,0 +1,8 @@
+---
+- block:
+  - name: "Install jmespath python lib"
+    pip:
+      name: jmespath
+
+  become: yes
+    
\ No newline at end of file
diff --git a/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/tasks/main.yaml b/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/tasks/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..94950de935b75cd62cf60131cfad84f0e787ee9e
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/tasks/main.yaml
@@ -0,0 +1,13 @@
+---
+
+- name: "Download heketi storage"
+  include: heketi-download-heketi-storage.yaml
+
+- name: "Install python library"
+  include: install-python-libraries.yaml
+
+- name: "Get Heketi db raw"
+  include: heketi-get-heketi-db-raw.yaml
+
+- name: "Copy Heketi db into a gluster volume"
+  include: heketi-copy-heketi-db-into-gluster-volume.yaml
diff --git a/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/templates/k8s/copy-endpoints.yaml b/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/templates/k8s/copy-endpoints.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..1acb3e2289b7053a5054b2d40ab0268ac281dc26
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/templates/k8s/copy-endpoints.yaml
@@ -0,0 +1,26 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+kind: Endpoints
+apiVersion: v1
+metadata:
+  name: heketi-storage-endpoints
+  namespace: "{{ heketi_namespace }}"
+subsets:
+{% for host, ip in gluster_host_ips.items() %}      
+- addresses:
+  - ip: "{{ ip }}"
+  ports:
+  - port: 1
+{% endfor %}
diff --git a/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/templates/k8s/copy-job.yaml b/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/templates/k8s/copy-job.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..ea5c1c7b3498d932eaf6ec0164fb5e2fb8172454
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/templates/k8s/copy-job.yaml
@@ -0,0 +1,51 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+kind: Job
+apiVersion: batch/v1
+metadata:
+  name: heketi-storage-copy-job
+  labels:
+    heketi-deployer: support
+  namespace: "{{ heketi_namespace }}"
+spec:
+  parallelism: 1
+  completions: 1
+  template:
+    metadata:
+      name: heketi-storage-copy-job
+    spec:
+      volumes:
+      - name: heketi-storage
+        glusterfs:
+          endpoints: heketi-storage-endpoints
+          path: heketidbstorage
+      - name: heketi-storage-secret
+        secret:
+          secretName: heketi-storage-secret
+      containers:
+        - name: heketi
+          image: heketi/heketi:dev
+          command:
+          - cp
+          - "/db/heketi.db"
+          - "/heketi"
+          resources: {}
+          volumeMounts:
+            - name: heketi-storage
+              mountPath: "/heketi"
+            - name: heketi-storage-secret
+              mountPath: "/db"
+      restartPolicy: Never
+status: {}
diff --git a/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/templates/k8s/copy-secret.yaml b/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/templates/k8s/copy-secret.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..dd76a54c451999513bbd100bc62bb995f5861231
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/templates/k8s/copy-secret.yaml
@@ -0,0 +1,24 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+kind: Secret
+apiVersion: v1
+metadata:
+  name: heketi-storage-secret
+  creationTimestamp: 
+  labels:
+    heketi-deployer: support
+  namespace: "{{ heketi_namespace }}"
+data:
+  heketi.db: "{{ heketi_db_raw }}"
diff --git a/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/templates/k8s/copy-service.yaml b/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/templates/k8s/copy-service.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..2fa80ef730d71092fbddc0f500b37235318544c4
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_copy_db_to_gluster_volume/templates/k8s/copy-service.yaml
@@ -0,0 +1,25 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+kind: Service
+apiVersion: v1
+metadata:
+  name: heketi-storage-endpoints
+  namespace: "{{ heketi_namespace }}"
+spec:
+  ports:
+    - port: 1
+      targetPort: 0
+status:
+  loadBalancer: {}
diff --git a/ansible/install_gluster/roles/heketi_copy_job_stop/defaults/main.yaml b/ansible/install_gluster/roles/heketi_copy_job_stop/defaults/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..cb10b4c331118c209c6f4dfef8ba04d3a7caf512
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_copy_job_stop/defaults/main.yaml
@@ -0,0 +1,35 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+heketi_gluster_storage_device: "/dev/sdb"
+
+# Directory where to place config files, e.g. the topology file.
+heketi_config_dir: "/tmp/k8s-gluster-heketi-ansible"
+
+heketi_namespace: 'gluster-heketi-ns'
+# heketi_storage_namespace: 'storage-heketi-ns'
+
+# Heketi container image
+# Info: https://hub.docker.com/r/heketi/heketi
+heketi_image: "heketi/heketi:dev"
+
+# Heketi client
+# Info: https://github.com/heketi/heketi/releases/
+heketi_client_url: "https://github.com/heketi/heketi/releases/download/v9.0.0/heketi-client-v9.0.0.linux.amd64.tar.gz"
+
+# User Token / Keys
+# XXX ToDo: create new one for each run
+# XXX ToDo: secret one
+heketi_user_key: user-key-934
+heketi_admin_key: admin-key-934
diff --git a/ansible/install_gluster/roles/heketi_copy_job_stop/tasks/main.yaml b/ansible/install_gluster/roles/heketi_copy_job_stop/tasks/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..735c61a71a0ab4d2c3ed2da53e465a80b40098cd
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_copy_job_stop/tasks/main.yaml
@@ -0,0 +1,21 @@
+---
+
+- name: "Create heketi secret for COPY task"
+  k8s:
+    state: absent
+    definition: "{{ lookup('template', 'k8s/copy-secret.yaml') }}"
+
+- name: "Create heketi endpoints for COPY task"
+  k8s:
+    state: absent
+    definition: "{{ lookup('template', 'k8s/copy-endpoints.yaml') }}"
+
+- name: "Create heketi service for COPY task"
+  k8s:
+    state: absent
+    definition: "{{ lookup('template', 'k8s/copy-service.yaml') }}"
+
+- name: "Create heketi job for COPY task"
+  k8s:
+    state: absent
+    definition: "{{ lookup('template', 'k8s/copy-job.yaml') }}"
diff --git a/ansible/install_gluster/roles/heketi_copy_job_stop/templates/k8s/copy-endpoints.yaml b/ansible/install_gluster/roles/heketi_copy_job_stop/templates/k8s/copy-endpoints.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..1acb3e2289b7053a5054b2d40ab0268ac281dc26
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_copy_job_stop/templates/k8s/copy-endpoints.yaml
@@ -0,0 +1,26 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+kind: Endpoints
+apiVersion: v1
+metadata:
+  name: heketi-storage-endpoints
+  namespace: "{{ heketi_namespace }}"
+subsets:
+{% for host, ip in gluster_host_ips.items() %}      
+- addresses:
+  - ip: "{{ ip }}"
+  ports:
+  - port: 1
+{% endfor %}
diff --git a/ansible/install_gluster/roles/heketi_copy_job_stop/templates/k8s/copy-job.yaml b/ansible/install_gluster/roles/heketi_copy_job_stop/templates/k8s/copy-job.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..ea5c1c7b3498d932eaf6ec0164fb5e2fb8172454
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_copy_job_stop/templates/k8s/copy-job.yaml
@@ -0,0 +1,51 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+kind: Job
+apiVersion: batch/v1
+metadata:
+  name: heketi-storage-copy-job
+  labels:
+    heketi-deployer: support
+  namespace: "{{ heketi_namespace }}"
+spec:
+  parallelism: 1
+  completions: 1
+  template:
+    metadata:
+      name: heketi-storage-copy-job
+    spec:
+      volumes:
+      - name: heketi-storage
+        glusterfs:
+          endpoints: heketi-storage-endpoints
+          path: heketidbstorage
+      - name: heketi-storage-secret
+        secret:
+          secretName: heketi-storage-secret
+      containers:
+        - name: heketi
+          image: heketi/heketi:dev
+          command:
+          - cp
+          - "/db/heketi.db"
+          - "/heketi"
+          resources: {}
+          volumeMounts:
+            - name: heketi-storage
+              mountPath: "/heketi"
+            - name: heketi-storage-secret
+              mountPath: "/db"
+      restartPolicy: Never
+status: {}
diff --git a/ansible/install_gluster/roles/heketi_copy_job_stop/templates/k8s/copy-secret.yaml b/ansible/install_gluster/roles/heketi_copy_job_stop/templates/k8s/copy-secret.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..dd76a54c451999513bbd100bc62bb995f5861231
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_copy_job_stop/templates/k8s/copy-secret.yaml
@@ -0,0 +1,24 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+kind: Secret
+apiVersion: v1
+metadata:
+  name: heketi-storage-secret
+  creationTimestamp: 
+  labels:
+    heketi-deployer: support
+  namespace: "{{ heketi_namespace }}"
+data:
+  heketi.db: "{{ heketi_db_raw }}"
diff --git a/ansible/install_gluster/roles/heketi_copy_job_stop/templates/k8s/copy-service.yaml b/ansible/install_gluster/roles/heketi_copy_job_stop/templates/k8s/copy-service.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..2fa80ef730d71092fbddc0f500b37235318544c4
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_copy_job_stop/templates/k8s/copy-service.yaml
@@ -0,0 +1,25 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+kind: Service
+apiVersion: v1
+metadata:
+  name: heketi-storage-endpoints
+  namespace: "{{ heketi_namespace }}"
+spec:
+  ports:
+    - port: 1
+      targetPort: 0
+status:
+  loadBalancer: {}
diff --git a/ansible/install_gluster/roles/heketi_deploy_topology/defaults/main.yaml b/ansible/install_gluster/roles/heketi_deploy_topology/defaults/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..0527e729af9473602ec08fb5b003f740af42a8e8
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_deploy_topology/defaults/main.yaml
@@ -0,0 +1,30 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+heketi_gluster_storage_device: "/dev/sdb"
+heketi_namespace: 'gluster-heketi-ns'
+# heketi_storage_namespace: 'storage-heketi-ns'
+
+# Heketi container image
+# Info: https://hub.docker.com/r/heketi/heketi
+# heketi_image: "heketi/heketi:dev"
+
+# User Token / Keys
+# XXX ToDo: create new one for each run
+# XXX ToDo: secret one
+# heketi_user_key: user-key-934
+heketi_admin_key: admin-key-934
+
+# not sure if this value is needed
+# heketi_executor: 'kubernetes'
\ No newline at end of file
diff --git a/ansible/install_gluster/roles/heketi_deploy_topology/tasks/heketi-create-topology.yaml b/ansible/install_gluster/roles/heketi_deploy_topology/tasks/heketi-create-topology.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..b2efebc8c9e7824bbff5a8cb011ce142cfae40b4
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_deploy_topology/tasks/heketi-create-topology.yaml
@@ -0,0 +1,18 @@
+---
+
+- name: Create temporary build directory
+  ansible.builtin.tempfile:
+    state: directory
+    prefix: ansible.heketi.
+  register: temp_directory
+
+- name: "Display temporary build directory"
+  debug:
+    var: temp_directory
+
+- name: "Create topology file"
+  template:
+    src: heketi-topology.json
+    dest: "{{ temp_directory.path }}/heketi-topology.json"
+    mode: '0644'
+
diff --git a/ansible/install_gluster/roles/heketi_deploy_topology/tasks/heketi-deploy-topology.yaml b/ansible/install_gluster/roles/heketi_deploy_topology/tasks/heketi-deploy-topology.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..f4e321a29af280976d29f52c111c26178d39deba
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_deploy_topology/tasks/heketi-deploy-topology.yaml
@@ -0,0 +1,32 @@
+---
+- name: "Set heketi_exec_pod command"
+  set_fact:
+    heketi_exec_command: "kubectl exec -n {{ heketi_namespace }} {{ heketi_pod_name }} -- heketi-cli --user admin --secret {{ heketi_admin_key }}"
+
+- name: "Load topology file into heteki - take some time"
+  shell: >-
+    {{ heketi_exec_command }} topology load --json="/var/lib/heketi/heketi-topology.json"
+  register: heketi_load_topology
+
+- name: "load topology command"
+  debug:
+    msg: "{{ heketi_load_topology.cmd }}"
+    
+- name: "show topology command output"
+  debug:
+    msg: "{{ heketi_load_topology.stdout_lines }}"
+
+- name: "Setup storage"
+  shell: >-
+    {{ heketi_exec_command }} setup-openshift-heketi-storage --listfile="/var/lib/heketi/heketi-storage.json"
+  register: heketi_setup_storage
+  ignore_errors: true
+
+- name: "Setup storage command"
+  debug:
+    msg: "{{ heketi_setup_storage.cmd }}"
+    
+- name: "Setup storage command output"
+  debug:
+    msg: "{{ heketi_setup_storage.stdout_lines }}"
+
diff --git a/ansible/install_gluster/roles/heketi_deploy_topology/tasks/heketi-get-pod-name.yaml b/ansible/install_gluster/roles/heketi_deploy_topology/tasks/heketi-get-pod-name.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..f1cab7dc26d281856848b194cc6d5c230bc49210
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_deploy_topology/tasks/heketi-get-pod-name.yaml
@@ -0,0 +1,18 @@
+---
+
+- name: "Get name of heketi deployer pod"
+  k8s_info:
+    kind: Pod
+    label_selectors:
+      - name = heketi-deployer
+  register: heketi_deploy_pod
+
+# - debug:
+#     var: heketi_deploy_pod
+
+- name: "Set heketi_exec_pod_name"
+  set_fact:
+    heketi_pod_name: "{{ heketi_deploy_pod.resources[0].metadata.name }}"
+
+- debug:
+    var: heketi_pod_name
diff --git a/ansible/install_gluster/roles/heketi_deploy_topology/tasks/heketi-upload-topology.yaml b/ansible/install_gluster/roles/heketi_deploy_topology/tasks/heketi-upload-topology.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..da5918db4d9b63fb4f043474d2bf920a842feaf6
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_deploy_topology/tasks/heketi-upload-topology.yaml
@@ -0,0 +1,5 @@
+---
+
+- name: "Upload topology file"
+  shell: |    
+    kubectl cp {{ temp_directory.path }}/heketi-topology.json {{ heketi_namespace }}/{{ heketi_pod_name }}:/var/lib/heketi/heketi-topology.json
diff --git a/ansible/install_gluster/roles/heketi_deploy_topology/tasks/main.yaml b/ansible/install_gluster/roles/heketi_deploy_topology/tasks/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..fdc8dfbfd2d0d9f1bfd491249b146075e3de48c3
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_deploy_topology/tasks/main.yaml
@@ -0,0 +1,40 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) contributors of manics/ansible-role-k8s-heketi-gluster
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+# https://github.com/gluster/gluster-kubernetes/blob/master/docs/setup-guide.md 
+# 
+# Deploys an instance of heketi called 'deploy-heketi', which is used to initialize the heketi database.
+# We will name it 'heketi-deployer' as it takes the topology, initializes the disks and creates the heketi db
+# We will split in two steps, in this second step we will deploy the topology 
+
+# now we need to load the topology, but to do so we need to 
+# - have the topology file in the pod
+# - execute the topology load command
+# - execute the setup-openshift-heketi-storage
+# for convenience we will create a shortcut command to execute commands using kubectl exec
+
+- name: "Create topology"
+  include: heketi-create-topology.yaml
+
+- name: "Get Heketi pod"
+  include: heketi-get-pod-name.yaml
+
+- name: "Upload topology"
+  include: heketi-upload-topology.yaml
+
+- name: "Deploy topology"
+  include: heketi-deploy-topology.yaml
+
+# - meta: end_play
diff --git a/ansible/install_gluster/roles/heketi_deploy_topology/templates/heketi-topology.json b/ansible/install_gluster/roles/heketi_deploy_topology/templates/heketi-topology.json
new file mode 100755
index 0000000000000000000000000000000000000000..41da325ff338735d6e39a11518736da2a5484e7b
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_deploy_topology/templates/heketi-topology.json
@@ -0,0 +1,29 @@
+{
+    "_copyright":
+    "This file is part of the k8s-gluster-heketi-ansible project,\nan ansible collection to install glusterfs and heketi into\nkubernetes to provide dynamic persistent volumes.\n\n(c) 2020 Andreas Florath, Deutsche Telekom AG\n\nBy default all files of this project are licensed under the Apache-2.0\nlicense. For details see the file 'LICENSE' in the top directory.\nhttps://opensource.org/licenses/Apache-2.0\n\nSPDX-License-Identifier: Apache-2.0\n",
+    
+    "clusters": [
+	{
+	    "nodes": [
+{% for host, ip in gluster_host_ips.items() %}      
+		{
+		    "node": {
+			"hostnames": {
+			    "manage": [
+				"{{ host }}"
+			    ],
+			    "storage": [
+				"{{ ip }}"
+			    ]
+			},
+			"zone": 1
+		    },
+		    "devices": [
+			"{{ heketi_gluster_storage_device }}"
+		    ]
+		}{% if not loop.last %},{% endif %}
+{% endfor %}
+	    ]
+	}
+    ]
+}
diff --git a/ansible/install_gluster/roles/heketi_deployer/defaults/main.yaml b/ansible/install_gluster/roles/heketi_deployer/defaults/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..1be2b54a1077c18dfffb1106afec30b851a66a90
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_deployer/defaults/main.yaml
@@ -0,0 +1,29 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+heketi_namespace: 'gluster-heketi-ns'
+# heketi_storage_namespace: 'storage-heketi-ns'
+
+# Heketi container image
+# Info: https://hub.docker.com/r/heketi/heketi
+heketi_image: "heketi/heketi:dev"
+
+# User Token / Keys
+# XXX ToDo: create new one for each run
+# XXX ToDo: secret one
+heketi_user_key: user-key-934
+heketi_admin_key: admin-key-934
+
+# not sure if this value is needed
+heketi_executor: 'kubernetes'
\ No newline at end of file
diff --git a/ansible/install_gluster/roles/heketi_deployer/tasks/main.yaml b/ansible/install_gluster/roles/heketi_deployer/tasks/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..39753347fcf7a616afd5fbbf0be848a5ffe8cb34
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_deployer/tasks/main.yaml
@@ -0,0 +1,53 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) contributors of manics/ansible-role-k8s-heketi-gluster
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+# https://github.com/gluster/gluster-kubernetes/blob/master/docs/setup-guide.md 
+# 
+# Deploys an instance of heketi called 'deploy-heketi', which is used to initialize the heketi database.
+# We will name it 'heketi-deployer' as it takes the topology, initializes the disks and creates the heketi db
+# We will split in two steps, in this first step we will deploy the heketi deployer
+
+- name: "Create heketi namespace"
+  k8s:
+    state: present
+    definition: "{{ lookup('template', 'k8s/namespace.yaml') }}"
+
+- name: "Create heketi service account"
+  k8s:
+    state: present
+    definition: "{{ lookup('template', 'k8s/service-account.yaml') }}"
+
+- name: "Create heketi cluster role binding"
+  k8s:
+    state: present
+    definition: "{{ lookup('template', 'k8s/cluster-role-binding.yaml') }}"
+
+- name: "Create heketi service"
+  k8s:
+    state: present
+    definition: "{{ lookup('template', 'k8s/service.yaml') }}"
+
+- name: "Create heketi secret"
+  k8s:
+    state: present
+    definition: "{{ lookup('template', 'k8s/secret.yaml') }}"
+
+- name: "Create heketi deploy deployment - take some time"
+  k8s:
+    state: present
+    definition: "{{ lookup('template', 'k8s/heketi-deployer-deployment.yaml') }}"
+    wait: true
+    wait_sleep: 5
+    wait_timeout: 180
diff --git a/ansible/install_gluster/roles/heketi_deployer/templates/k8s/cluster-role-binding.yaml b/ansible/install_gluster/roles/heketi_deployer/templates/k8s/cluster-role-binding.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..502fae048a6eb34dc1ce01606b33bfc62c7fd3c4
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_deployer/templates/k8s/cluster-role-binding.yaml
@@ -0,0 +1,30 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+  name: storage-heketi-binding
+  labels:
+    glusterfs: heketi-sa-view
+    heketi: sa-view
+    heketi-bootstrap: 'true'
+subjects:
+  - kind: ServiceAccount
+    name: heketi-service-account
+    namespace: "{{ heketi_namespace }}"
+roleRef:
+  kind: ClusterRole
+  name: edit
+  apiGroup: rbac.authorization.k8s.io
diff --git a/ansible/install_gluster/roles/heketi_deployer/templates/k8s/heketi-deployer-deployment.yaml b/ansible/install_gluster/roles/heketi_deployer/templates/k8s/heketi-deployer-deployment.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..5852588e2dd8b102f13ca5c5c1dbe7dc27eab8ca
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_deployer/templates/k8s/heketi-deployer-deployment.yaml
@@ -0,0 +1,81 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+kind: Deployment
+apiVersion: apps/v1
+metadata:
+  name: heketi-deployer
+  namespace: "{{ heketi_namespace }}"
+  labels:
+    glusterfs: heketi-deployment
+    heketi-deployer: deployment
+  annotations:
+    description: Defines how to deploy Heketi
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      name: heketi-deployer
+  template:
+    metadata:
+      name: heketi-deployer
+      labels:
+        name: heketi-deployer
+        glusterfs: heketi-pod
+        heketi-deployer: pod
+    spec:
+      serviceAccountName: heketi-service-account
+      containers:
+      - image: "{{ heketi_image }}"
+        imagePullPolicy: IfNotPresent
+        name: heketi-deployer
+        env:
+          - name: HEKETI_USER_KEY
+            value: "{{ heketi_user_key }}"
+          - name: HEKETI_ADMIN_KEY
+            value: "{{ heketi_admin_key }}"
+          - name: HEKETI_EXECUTOR
+            value: "{{ heketi_executor }}"
+          - name: HEKETI_KUBE_NAMESPACE
+            value: "{{ heketi_namespace }}"
+          - name: HEKETI_FSTAB
+            value: "/var/lib/heketi/fstab"
+          - name: HEKETI_SNAPSHOT_LIMIT
+            value: '14'
+          - name: HEKETI_KUBE_GLUSTER_DAEMONSET
+            value: "y"
+        ports:
+        - containerPort: 8080
+        volumeMounts:
+        - name: db
+          mountPath: "/var/lib/heketi"
+        - name: config
+          mountPath: "/etc/heketi"
+        readinessProbe:
+          timeoutSeconds: 3
+          initialDelaySeconds: 3
+          httpGet:
+            path: "/hello"
+            port: 8080
+        livenessProbe:
+          timeoutSeconds: 3
+          initialDelaySeconds: 30
+          httpGet:
+            path: "/hello"
+            port: 8080
+      volumes:
+        - name: db
+        - name: config
+          secret:
+            secretName: heketi-config-secret
diff --git a/ansible/install_gluster/roles/heketi_deployer/templates/k8s/namespace.yaml b/ansible/install_gluster/roles/heketi_deployer/templates/k8s/namespace.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..db2d055afe7fc1b425a2ec8951e6cf4ab060c83e
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_deployer/templates/k8s/namespace.yaml
@@ -0,0 +1,20 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+kind: Namespace
+api_version: v1
+metadata:
+  name: "{{ heketi_namespace }}"
+  labels:
+    name: "{{ heketi_namespace }}"
diff --git a/ansible/install_gluster/roles/heketi_deployer/templates/k8s/secret.yaml b/ansible/install_gluster/roles/heketi_deployer/templates/k8s/secret.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..0d257012dbbb9654170be9c1f47427c35f3d3e6b
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_deployer/templates/k8s/secret.yaml
@@ -0,0 +1,23 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+kind: Secret
+apiVersion: v1
+metadata:
+  labels:
+    heketi: config-secret
+  name: heketi-config-secret
+  namespace: "{{ heketi_namespace }}"
+data:
+  heketi.json: "{{ heketi_json_base64 }}"
diff --git a/ansible/install_gluster/roles/heketi_deployer/templates/k8s/service-account.yaml b/ansible/install_gluster/roles/heketi_deployer/templates/k8s/service-account.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..3c6c97b6f84ba21fa840fd9736197497688f19c7
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_deployer/templates/k8s/service-account.yaml
@@ -0,0 +1,23 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: heketi-service-account
+  labels:
+    glusterfs: heketi-sa
+    heketi: sa
+    heketi-bootstrap: 'true'
+  namespace: "{{ heketi_namespace }}"
diff --git a/ansible/install_gluster/roles/heketi_deployer/templates/k8s/service.yaml b/ansible/install_gluster/roles/heketi_deployer/templates/k8s/service.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..05bfbbbeda3c100b83990d3f3bfa6d71434e6010
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_deployer/templates/k8s/service.yaml
@@ -0,0 +1,31 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+kind: Service
+apiVersion: v1
+metadata:
+  name: heketi-deployer
+  namespace: {{ heketi_namespace }}
+  labels:
+    glusterfs: heketi-service
+    heketi-deployer: support
+  annotations:
+    description: Exposes Heketi Service
+spec:
+  selector:
+    name: heketi-deployer
+  ports:
+    - name: heketi-deployer
+      port: 8080
+      targetPort: 8080
diff --git a/ansible/install_gluster/roles/heketi_deployer_stop/defaults/main.yaml b/ansible/install_gluster/roles/heketi_deployer_stop/defaults/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..1be2b54a1077c18dfffb1106afec30b851a66a90
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_deployer_stop/defaults/main.yaml
@@ -0,0 +1,29 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+heketi_namespace: 'gluster-heketi-ns'
+# heketi_storage_namespace: 'storage-heketi-ns'
+
+# Heketi container image
+# Info: https://hub.docker.com/r/heketi/heketi
+heketi_image: "heketi/heketi:dev"
+
+# User Token / Keys
+# XXX ToDo: create new one for each run
+# XXX ToDo: secret one
+heketi_user_key: user-key-934
+heketi_admin_key: admin-key-934
+
+# not sure if this value is needed
+heketi_executor: 'kubernetes'
\ No newline at end of file
diff --git a/ansible/install_gluster/roles/heketi_deployer_stop/tasks/main.yaml b/ansible/install_gluster/roles/heketi_deployer_stop/tasks/main.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..93dd363f531d44e19e808a5571adcb3743135f44
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_deployer_stop/tasks/main.yaml
@@ -0,0 +1,44 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) contributors of manics/ansible-role-k8s-heketi-gluster
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+# https://github.com/gluster/gluster-kubernetes/blob/master/docs/setup-guide.md 
+# 
+# Deploys an instance of heketi called 'deploy-heketi', which is used to initialize the heketi database.
+# We will name it 'heketi-deployer' as it takes the topology, initializes the disks and creates the heketi db
+# We will split in two steps, in this first step we will deploy the heketi deployer
+
+# No tengo claro si esto sobra o no
+# - name: "Create heketi service account"
+#   k8s:
+#     state: present
+#     definition: "{{ lookup('template', 'k8s/service-account.yaml') }}"
+
+# - name: "Create heketi cluster role binding"
+#   k8s:
+#     state: present
+#     definition: "{{ lookup('template', 'k8s/cluster-role-binding.yaml') }}"
+
+- name: "Create heketi service"
+  k8s:
+    state: absent
+    definition: "{{ lookup('template', 'k8s/service.yaml') }}"
+
+- name: "Create heketi deploy deployment - take some time"
+  k8s:
+    state: absent
+    definition: "{{ lookup('template', 'k8s/heketi-deployer-deployment.yaml') }}"
+    wait: true
+    wait_sleep: 5
+    wait_timeout: 180
diff --git a/ansible/install_gluster/roles/heketi_deployer_stop/templates/k8s/heketi-deployer-deployment.yaml b/ansible/install_gluster/roles/heketi_deployer_stop/templates/k8s/heketi-deployer-deployment.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..a4c27153be46fc578d14fd259da7e1603182bffc
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_deployer_stop/templates/k8s/heketi-deployer-deployment.yaml
@@ -0,0 +1,81 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+kind: Deployment
+apiVersion: apps/v1
+metadata:
+  name: heketi-deployer
+  labels:
+    glusterfs: heketi-deployment
+    heketi-deployer: deployment
+  annotations:
+    description: Defines how to deploy Heketi
+  namespace: "{{ heketi_namespace }}"
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      name: heketi-deployer
+  template:
+    metadata:
+      name: heketi-deployer
+      labels:
+        name: heketi-deployer
+        glusterfs: heketi-pod
+        heketi-deployer: pod
+    spec:
+      serviceAccountName: heketi-service-account
+      containers:
+      - image: "{{ heketi_image }}"
+        imagePullPolicy: IfNotPresent
+        name: heketi-deployer
+        env:
+          - name: HEKETI_USER_KEY
+            value: "{{ heketi_user_key }}"
+          - name: HEKETI_ADMIN_KEY
+            value: "{{ heketi_admin_key }}"
+          - name: HEKETI_EXECUTOR
+            value: "{{ heketi_executor }}"
+          - name: HEKETI_KUBE_NAMESPACE
+            value: "{{ heketi_namespace }}"
+          - name: HEKETI_FSTAB
+            value: "/var/lib/heketi/fstab"
+          - name: HEKETI_SNAPSHOT_LIMIT
+            value: '14'
+          - name: HEKETI_KUBE_GLUSTER_DAEMONSET
+            value: "y"
+        ports:
+        - containerPort: 8080
+        volumeMounts:
+        - name: db
+          mountPath: "/var/lib/heketi"
+        - name: config
+          mountPath: "/etc/heketi"
+        readinessProbe:
+          timeoutSeconds: 3
+          initialDelaySeconds: 3
+          httpGet:
+            path: "/hello"
+            port: 8080
+        livenessProbe:
+          timeoutSeconds: 3
+          initialDelaySeconds: 30
+          httpGet:
+            path: "/hello"
+            port: 8080
+      volumes:
+        - name: db
+        - name: config
+          secret:
+            secretName: heketi-config-secret
diff --git a/ansible/install_gluster/roles/heketi_deployer_stop/templates/k8s/service.yaml b/ansible/install_gluster/roles/heketi_deployer_stop/templates/k8s/service.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..05bfbbbeda3c100b83990d3f3bfa6d71434e6010
--- /dev/null
+++ b/ansible/install_gluster/roles/heketi_deployer_stop/templates/k8s/service.yaml
@@ -0,0 +1,31 @@
+---
+
+# This file is part of the k8s-gluster-heketi-ansible project,
+# an ansible collection to install glusterfs and heketi into
+# kubernetes to provide dynamic persistent volumes.
+#
+# (c) 2020 Andreas Florath, Deutsche Telekom AG
+#
+# By default all files of this project are licensed under the Apache-2.0
+# license. For details see the file 'LICENSE' in the top directory.
+# https://opensource.org/licenses/Apache-2.0
+#
+# SPDX-License-Identifier: Apache-2.0
+
+kind: Service
+apiVersion: v1
+metadata:
+  name: heketi-deployer
+  namespace: {{ heketi_namespace }}
+  labels:
+    glusterfs: heketi-service
+    heketi-deployer: support
+  annotations:
+    description: Exposes Heketi Service
+spec:
+  selector:
+    name: heketi-deployer
+  ports:
+    - name: heketi-deployer
+      port: 8080
+      targetPort: 8080
diff --git a/ansible/install_gluster/site.yaml b/ansible/install_gluster/site.yaml
new file mode 100755
index 0000000000000000000000000000000000000000..f8cef61beaea01af9c17878dd479757188f492d8
--- /dev/null
+++ b/ansible/install_gluster/site.yaml
@@ -0,0 +1,51 @@
+
+
+- hosts: all_kubernetes_servers
+  pre_tasks:
+    - name: "Ensure that all hosts are reachable"
+      assert:
+        that:
+          - ansible_play_hosts == ansible_play_hosts_all
+        quiet: true    
+  roles:
+    - name: gluster_modules
+
+- hosts: localhost
+  roles:
+    - name: gluster_container
+
+- hosts: localhost
+  roles:
+    - name: heketi_config
+
+- hosts: localhost
+  roles:
+    - name: heketi_deployer
+
+- hosts: localhost
+  roles:
+    - name: gluster_get_hosts
+
+- hosts: localhost
+  roles:
+    - name: heketi_deploy_topology
+
+- hosts: all_kubernetes_servers
+  roles:
+    - name: ensure_gluster_fs_client
+        
+- hosts: localhost
+  roles:
+    - name: heketi_copy_db_to_gluster_volume
+
+# - hosts: localhost
+#   roles:
+#     - name: heketi_deployer_stop    
+
+- hosts: localhost
+  roles:
+   - name: heketi    
+
+# - hosts: localhost
+#   roles:
+#    - name: heketi_copy_job_stop
\ No newline at end of file
diff --git a/ansible/install_glusterfs/roles/glusterfs/tasks/main.yaml b/ansible/install_glusterfs/roles/glusterfs/tasks/main.yaml
deleted file mode 100755
index 44b20e09ad4cb58a181dabab829116a0ad8e8a8d..0000000000000000000000000000000000000000
--- a/ansible/install_glusterfs/roles/glusterfs/tasks/main.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
----
-- name: Install bitnami repo 
-  kubernetes.core.helm_repository:
-    name: bitnami
-    repo_url: "{{ helm_chart_url }}"
-
-- name: Install glusterfs with helm
-  kubernetes.core.helm:
-    name: helm-bitnami-glusterfs
-    release_namespace: cluster-configuration
-    create_namespace: yes
-    chart_ref: bitnami/glusterfs-controller
-  register: install_glusterfs_controller
-
-- name: Install glusterfs with helm command
-  debug: 
-    msg: "{{ install_glusterfs_controller.command }}"
-
diff --git a/ansible/install_glusterfs/roles/glusterfs/vars/main.yaml b/ansible/install_glusterfs/roles/glusterfs/vars/main.yaml
deleted file mode 100755
index 44dc8aeb3b5ece182db458a3ab254cdcdea586c7..0000000000000000000000000000000000000000
--- a/ansible/install_glusterfs/roles/glusterfs/vars/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-helm_chart_url: "https://charts.bitnami.com/bitnami"
\ No newline at end of file
diff --git a/ansible/install_glusterfs/site.yaml b/ansible/install_glusterfs/site.yaml
deleted file mode 100755
index 495f7d6278c43c2a2cab44f396a051fd403b62a6..0000000000000000000000000000000000000000
--- a/ansible/install_glusterfs/site.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-# modified from https://github.com/danpilch/easy-kubeadm
----
-- hosts: localhost
-  roles:
-    - name: glusterfs
-