-
Notifications
You must be signed in to change notification settings - Fork 12
Doc/tagging/beats #455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Doc/tagging/beats #455
Changes from all commits
e2b7d6e
93897fb
d63b1c2
817f79e
9996efb
8d690b0
0fc540a
2c16ee9
2d608a2
c93a530
154b8f6
27c7783
aa2b34f
b2506e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| --- | ||
|
|
||
| - name: Set Custom Default Index | ||
| ansible.builtin.uri: | ||
| url: 'http://{{ ansible_default_ipv4.address }}:5601/api/kibana/settings' | ||
Check warningCode scanning / KICS Communication Over HTTP Warning
ansible.builtin.uri.url is accessed via the HTTP protocol'
|
||
| method: POST | ||
| body: | ||
| changes: | ||
| defaultIndex: '{{ kibana_custom_default_index }}' | ||
| body_format: json | ||
| headers: | ||
| kbn-version: 8.19.11 | ||
| Content-Type: application/json | ||
| register: result | ||
| - ansible.builtin.debug: | ||
| msg: "setting new custom Index to {{ kibana_custom_default_index }}" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,15 @@ | ||
| --- | ||
|
|
||
| - name: Ensure encryption key exists | ||
| ansible.builtin.stat: | ||
| path: "{{ elasticstack_ca_dir }}/encryption_key" | ||
| register: encryption_key_exists | ||
|
|
||
| - name: Ensure saved encryption key exists | ||
| ansible.builtin.stat: | ||
| path: "{{ elasticstack_ca_dir }}/savedobjects_encryption_key" | ||
| register: savedobjects_encryption_key_exists | ||
|
|
||
| - name: Ensure kibana certificate exists | ||
| ansible.builtin.stat: | ||
| path: "/etc/kibana/certs/{{ ansible_hostname }}-kibana.p12" | ||
|
|
@@ -125,11 +135,17 @@ | |
| - name: Generate encryption key # noqa: risky-shell-pipe | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need this? |
||
| ansible.builtin.shell: > | ||
| if test -n "$(ps -p $$ | grep bash)"; then set -o pipefail; fi; | ||
| openssl rand -base64 36 > | ||
| openssl rand -base64 {{ elasticstack_encryption_key_size }} > | ||
| {{ elasticstack_ca_dir }}/encryption_key | ||
| changed_when: false | ||
| args: | ||
| creates: "{{ elasticstack_ca_dir }}/encryption_key" | ||
| - ansible.builtin.stat: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this not a duplication of this task Ensure encryption key exists ? |
||
| path: "{{ elasticstack_ca_dir }}/encryption_key" | ||
| register: encryption_key_exists | ||
| - ansible.builtin.debug: | ||
| msg: "File exists..." | ||
| when: encryption_key_exists.stat.exists | ||
|
|
||
| - name: Fetch encryption key | ||
| ansible.builtin.command: cat {{ elasticstack_ca_dir }}/encryption_key | ||
|
|
@@ -139,12 +155,17 @@ | |
| - name: Generate saved objects encryption key # noqa: risky-shell-pipe | ||
| ansible.builtin.shell: > | ||
| if test -n "$(ps -p $$ | grep bash)"; then set -o pipefail; fi; | ||
| openssl rand | ||
| -base64 36 > | ||
| openssl rand -base64 {{ elasticstack_encryption_key_size }} > | ||
| {{ elasticstack_ca_dir }}/savedobjects_encryption_key | ||
| changed_when: false | ||
| args: | ||
| creates: "{{ elasticstack_ca_dir }}/savedobjects_encryption_key" | ||
| - ansible.builtin.stat: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this not a duplication of this task Ensure saved encryption key exists? |
||
| path: "{{ elasticstack_ca_dir }}/savedobjects_encryption_key" | ||
| register: savedobjects_encryption_key | ||
| - ansible.builtin.debug: | ||
| msg: "File exists..." | ||
| when: savedobjects_encryption_key.stat.exists | ||
|
|
||
| - name: Fetch saved objects encryption key | ||
| ansible.builtin.command: cat {{ elasticstack_ca_dir }}/savedobjects_encryption_key | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we need this task?