Adding lint fixes

This commit is contained in:
Zenidd 2020-03-11 17:55:28 +01:00
parent a4465eb82f
commit 9dc91b8877
3 changed files with 14 additions and 7 deletions

View File

@ -50,5 +50,5 @@ build_from_sources: false
wazuh_plugin_branch: 3.11-7.6 wazuh_plugin_branch: 3.11-7.6
#Nodejs NODE_OPTIONS #Nodejs NODE_OPTIONS
kibana_script_node_options: "--max-old-space-size=4096" kibana_script_node_options: ""
node_options: --max-old-space-size=4096 node_options: --max-old-space-size=4096

View File

@ -63,7 +63,7 @@
chdir: "/tmp/app/build" chdir: "/tmp/app/build"
- name: Install Wazuh Plugin (can take a while) - name: Install Wazuh Plugin (can take a while)
shell: 'NODE_OPTIONS="{{node_options}}" /usr/share/kibana/bin/kibana-plugin install file:///tmp/app/build/{{ wazuhapp_package_name.stdout }}' shell: 'NODE_OPTIONS=" {{node_options}} " /usr/share/kibana/bin/kibana-plugin install file:///tmp/app/build/{{ wazuhapp_package_name.stdout }}'
args: args:
executable: /bin/bash executable: /bin/bash
creates: /usr/share/kibana/plugins/wazuh/package.json creates: /usr/share/kibana/plugins/wazuh/package.json

View File

@ -65,9 +65,14 @@
- name: Kibana script additional configuration for node - name: Kibana script additional configuration for node
replace: replace:
path: /usr/share/kibana/bin/kibana path: /usr/share/kibana/bin/kibana
regexp: 'NODE_OPTIONS=\"--no-warnings --max-http-header-size=65536 \$\{NODE_OPTIONS\}\" NODE_ENV=production exec \"\$\{NODE}\" \"\$\{DIR\}/src/cli\" \$\{@\}' regexp: >-
replace: 'NODE_OPTIONS="--no-warnings {{kibana_script_node_options}} --max-http-header-size=65536 ${NODE_OPTIONS}" NODE_ENV=production exec "${NODE}" "${DIR}/src/cli" ${@}' 'NODE_OPTIONS=\"--no-warnings --max-http-header-size=65536 \$\{NODE_OPTIONS\}\"
when: kibana_script_node_options != "" NODE_ENV=production exec \"\$\{NODE}\" \"\$\{DIR\}/src/cli\" \$\{@\}'
replace: >-
'NODE_OPTIONS="--no-warnings {{kibana_script_node_options}} --max-http-header-size=65536 ${NODE_OPTIONS}"
NODE_ENV=production exec "${NODE}" "${DIR}/src/cli" ${@}'
when: kibana_script_node_options | length > 0
- name: Ensuring certificates folder owner - name: Ensuring certificates folder owner
file: file:
@ -126,7 +131,9 @@
- name: Install Wazuh Plugin (can take a while) - name: Install Wazuh Plugin (can take a while)
shell: 'NODE_OPTIONS="{{node_options}}" /usr/share/kibana/bin/kibana-plugin install {{ wazuh_app_url }}-{{ wazuh_version }}_{{ elastic_stack_version }}.zip' shell: >-
'NODE_OPTIONS=" {{node_options}} " /usr/share/kibana/bin/kibana-plugin install {{ wazuh_app_url }}
-{{ wazuh_version }}_{{ elastic_stack_version }}.zip'
args: args:
executable: /bin/bash executable: /bin/bash
creates: /usr/share/kibana/plugins/wazuh/package.json creates: /usr/share/kibana/plugins/wazuh/package.json
@ -141,7 +148,7 @@
- not build_from_sources - not build_from_sources
- name: Kibana optimization (can take a while) - name: Kibana optimization (can take a while)
shell: 'NODE_OPTIONS="{{node_options}}" /usr/share/kibana/bin/kibana --optimize --allow-root' shell: 'NODE_OPTIONS=" {{node_options}} " /usr/share/kibana/bin/kibana --optimize'
args: args:
executable: /bin/bash executable: /bin/bash
become: yes become: yes