Commit 8554e32c authored by Keshav Prasad's avatar Keshav Prasad
Browse files

fix: dont use epoch date facts caching

Showing with 5 additions and 8 deletions
+5 -8
......@@ -8,9 +8,9 @@
roles:
- role: es-azure-snapshot
when: cloud_provider == "azure"
- role: aws-azure-snapshot
- role: es-aws-snapshot
when: cloud_provider == "aws"
- role: gclou-azure-snapshot
- role: es-gcloud-snapshot
when: cloud_provider == "gcloud"
- role: es5-snapshot-purge
tags:
......
......@@ -2,6 +2,8 @@
- set_fact: base_path_date="{{ lookup('pipe','date +%Y-%m') }}"
- set_fact: snapshot_number="snapshot_{{ lookup('pipe','date +%s') }}"
- name: Create azure snapshot
uri:
url: "http://{{ es_snapshot_host }}:9200/_snapshot/{{ snapshot_base_path }}"
......@@ -10,11 +12,6 @@
headers:
Content-Type: "application/json"
- debug:
msg: "snapshot_base_path: {{ snapshot_base_path }}"
- set_fact: snapshot_number="snapshot_{{ansible_date_time.epoch}}"
- name: Take new snapshot
uri:
url: "http://{{ es_snapshot_host }}:9200/_snapshot/{{ snapshot_base_path }}/{{ snapshot_number }}"
......
......@@ -10,4 +10,4 @@
command: "{{es_home}}/bin/elasticsearch-keystore create"
environment:
ES_PATH_CONF: "{{ conf_dir }}"
when: elasticsearch_keystore_file.stat.exists is false
when: elasticsearch_keystore_file.stat.exists == false
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment