Skip to content

Commit

Permalink
Update parse_to_elasticsearch.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-f authored Jan 29, 2024
1 parent c5afe2d commit 97a1f98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/ansible_openvpn/playbooks/parse_to_elasticsearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
connection: local
vars:
source: '/home/semaphore/data/to_process/'
destination: '/home/semaphore/data/archive/{{ ansible_date_time.year }}_{{ ansible_date_time.iso8601|slice("W")|int }}/'
destination: '/home/semaphore/data/archive/'
api_key: "{{ lookup('ansible.builtin.env', 'ELASTIC_SEARCH_API_KEY') }}"
api_key_id: "{{ lookup('ansible.builtin.env', 'ELASTIC_SEARCH_API_KEY_ID') }}"
tasks:
Expand All @@ -18,7 +18,7 @@
delegate_to: localhost
- name: Launch python script from playbook
ansible.builtin.script:
cmd: scripts_elasticsearch/feed_rpi_data.py --host https://es01:9200 --json_input_folder '{{ source }}' --api_key '{{ api_key }}' --api_key_id '{{ api_key_id }}' --json_archive_folder '{{ destination }}' -v
cmd: scripts_elasticsearch/feed_rpi_data.py --host https://es01:9200 --json_input_folder '{{ source }}' --api_key '{{ api_key }}' --api_key_id '{{ api_key_id }}' --json_archive_folder '{{ destination }}/$(echo $(date +"%Y-%W"))/' -v
args:
executable: python3
register: result
Expand Down

0 comments on commit 97a1f98

Please sign in to comment.