From 46cd61cd280de121167c7d7b024ccd8a955bcb60 Mon Sep 17 00:00:00 2001 From: vjrj Date: Fri, 17 Nov 2023 12:50:20 +0100 Subject: [PATCH] Added .gitignore to data-dir for optionally use git to track configs (#715) --- ansible/roles/common/files/data-gitignore | 50 +++++++++++++++++++++++ ansible/roles/common/tasks/main.yml | 9 +++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 ansible/roles/common/files/data-gitignore diff --git a/ansible/roles/common/files/data-gitignore b/ansible/roles/common/files/data-gitignore new file mode 100644 index 000000000..b7cd3c6b1 --- /dev/null +++ b/ansible/roles/common/files/data-gitignore @@ -0,0 +1,50 @@ +ala/data/runtime +ala-hub/cache +ala-hub/download +ala-hub/geolite_db +bie/*zip +bie/import +biocache/heatmap +biocache/layers +biocache/tmp +biocache-delete +biocache-download +biocache-load +biocache-media +biocache-reindex +biocache-upload/status +biocache-upload/temp +cache +cassandra3 +collectory/tmp +dashboard/data.json +dashboard/csv +dashboard/zip +data-quality-filter-service/logs +dbs +doi-service/logs +dwca-export +dwca-tmp +elasticsearch +geoserver_data_dir +*gz +hadoop +hdfs +image-service/bin +image-service/exports +image-service/incoming +image-service/store +*jar +lucene +migration +offline +output +pipelines-shp +postgresql-*-data +solr +spark +spark-tmp +spatial-data +specieslist-webapp/tmp +tmp/tomcat-tmp +*war diff --git a/ansible/roles/common/tasks/main.yml b/ansible/roles/common/tasks/main.yml index ff91decd2..e2f52c855 100644 --- a/ansible/roles/common/tasks/main.yml +++ b/ansible/roles/common/tasks/main.yml @@ -44,4 +44,11 @@ when: deployment_type not in ['vm', 'swarm', 'k8s'] tags: - common - - apt_update + +- name: copy .gitignore to optionally use git in {{ data_dir }} + copy: + src: data-gitignore + dest: "{{ data_dir }}/.gitignore" + tags: + - common + - gitignore