Skip to content

Commit

Permalink
fix: updated vars and uri module
Browse files Browse the repository at this point in the history
  • Loading branch information
beepdot committed Sep 8, 2022
1 parent 00b2899 commit 2d3877e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
6 changes: 4 additions & 2 deletions ansible/provision-log-es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,7 @@
method: PUT
return_content: true
timeout: 30
retries: 3
delay: 10
register: _result
until: _result.status == 200
retries: 3
delay: 10
4 changes: 2 additions & 2 deletions ansible/roles/log-es6/tasks/plugins/create-keystore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
- name: Check if elasticsearch keystore exists or not
become: yes
stat:
path: "{{ conf_dir }}/elasticsearch.keystore"
path: "{{ es_conf_dir }}/elasticsearch.keystore"
register: elasticsearch_keystore_file

- name: Create the elasticsearch keystore if not exists
become: yes
command: "{{es_home}}/bin/elasticsearch-keystore create"
environment:
ES_PATH_CONF: "{{ conf_dir }}"
ES_PATH_CONF: "{{ es_conf_dir }}"
when: elasticsearch_keystore_file.stat.exists == false
4 changes: 2 additions & 2 deletions ansible/roles/log-es6/tasks/plugins/repository-azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
shell: echo "{{ azure_management_storage_account_name }}" | {{ es_home }}/bin/elasticsearch-keystore add -f azure.client.default.account
no_log: True
environment:
ES_PATH_CONF: "{{ conf_dir }}"
ES_PATH_CONF: "{{ es_conf_dir }}"


- name: Add default azure account key for backups
become: yes
shell: echo "{{ azure_management_storage_account_key }}" | {{ es_home }}/bin/elasticsearch-keystore add -f azure.client.default.key
no_log: True
environment:
ES_PATH_CONF: "{{ conf_dir }}"
ES_PATH_CONF: "{{ es_conf_dir }}"
8 changes: 4 additions & 4 deletions ansible/roles/log-es6/tasks/plugins/repository-gcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
- name: Create the gcs service account file from variable
become: yes
copy:
dest: "{{ conf_dir }}/gcs_management_bucket_service_account.json"
dest: "{{ es_conf_dir }}/gcs_management_bucket_service_account.json"
content: "{{ gcs_management_bucket_service_account }}"

- name: Add gcs service account file to keystore
become: yes
shell: "{{ es_home }}/bin/elasticsearch-keystore add-file -f gcs.client.default.credentials_file {{ conf_dir }}/gcs_management_bucket_service_account.json"
shell: "{{ es_home }}/bin/elasticsearch-keystore add-file -f gcs.client.default.credentials_file {{ es_conf_dir }}/gcs_management_bucket_service_account.json"
no_log: True
environment:
ES_PATH_CONF: "{{ conf_dir }}"
ES_PATH_CONF: "{{ es_conf_dir }}"

- name: Remove the service account file
file:
path: "{{ conf_dir }}/gcs_management_bucket_service_account.json"
path: "{{ es_conf_dir }}/gcs_management_bucket_service_account.json"
state: absent
4 changes: 2 additions & 2 deletions ansible/roles/log-es6/tasks/plugins/repository-s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
shell: echo "{{ aws_management_bucket_user_access_key }}" | {{ es_home }}/bin/elasticsearch-keystore add -f s3.client.default.access_key
no_log: True
environment:
ES_PATH_CONF: "{{ conf_dir }}"
ES_PATH_CONF: "{{ es_conf_dir }}"

- name: Add default aws account key for backups
become: yes
shell: echo "{{ aws_management_bucket_user_secret_key }}" | {{ es_home }}/bin/elasticsearch-keystore add -f s3.client.default.secret_key
no_log: True
environment:
ES_PATH_CONF: "{{ conf_dir }}"
ES_PATH_CONF: "{{ es_conf_dir }}"

0 comments on commit 2d3877e

Please sign in to comment.