Skip to content

Commit

Permalink
Var renaming as requested in hitachienergy#2983 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
romsok24 authored and rafzei committed Mar 28, 2022
1 parent 70bce42 commit b272dde
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@

- name: Create OpenSearch Dashboards user
user:
name: "{{ specification.dashboards_user }}"
name: "{{ specification.dashboards_os_user }}"
state: present
shell: /bin/bash

- name: Create home directory
file:
path: "{{ specification.paths.opensearchdash_home }}"
state: directory
owner: "{{ specification.dashboards_user }}"
group: "{{ specification.dashboards_user }}"
owner: "{{ specification.dashboards_os_user }}"
group: "{{ specification.dashboards_os_user }}"

- name: Extract OpenSearch Dashboards tar file
unarchive:
src: "/tmp/{{ file_name_version.opensearch_dashboards[ansible_architecture] }}"
dest: "{{ specification.paths.opensearchdash_home }}"
owner: "{{ specification.dashboards_user }}"
owner: "{{ specification.dashboards_os_user }}"
remote_src: yes
extra_opts:
- --strip-components=1
Expand All @@ -32,8 +32,8 @@
template:
src: opensearch_dashboards.yml.j2
dest: "{{ specification.paths.opensearchdash_conf_dir }}/opensearch_dashboards.yml"
owner: "{{ specification.dashboards_user }}"
group: "{{ specification.dashboards_user }}"
owner: "{{ specification.dashboards_os_user }}"
group: "{{ specification.dashboards_os_user }}"
mode: 0644
backup: yes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ PrivateTmp=true

WorkingDirectory={{ specification.paths.opensearchdash_home }}

User={{ specification.dashboards_user }}
Group={{ specification.dashboards_user }}
User={{ specification.dashboards_os_user }}
Group={{ specification.dashboards_os_user }}

ExecStart={{ specification.paths.opensearchdash_home }}/bin/opensearch-dashboards -q

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ server.port: 5601
server.host: "{{ ansible_host }}"
opensearch.hosts: ["{{ opensearch_nodes_dashboards }}"]
opensearch.ssl.verificationMode: none
opensearch.username: "{{ specification.dashboards_user }}"
opensearch.username: "{{ specification.dashboards_os_user }}"
opensearch.password: "{{ specification.dashboards_password }}"
opensearch.requestHeadersWhitelist: [ authorization,securitytenant ]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

- name: Kibana migr | Create opensearch-dashboards user
user:
name: "{{ specification.dashboards_user }}"
name: "{{ specification.dashboards_os_user }}"
password: "{{ specification.dashboards_password }}"
state: present
shell: /bin/bash
Expand All @@ -31,8 +31,8 @@
file:
path: "{{ item }}"
state: directory
owner: "{{ specification.dashboards_user }}"
group: "{{ specification.dashboards_user }}"
owner: "{{ specification.dashboards_os_user }}"
group: "{{ specification.dashboards_os_user }}"
mode: ug=rwx,o=rx
with_items:
- "{{ specification.paths.opensearchdash_log_dir }}"
Expand All @@ -42,7 +42,7 @@
unarchive:
src: "/tmp/{{ file_name_version.opensearch_dashboards[ansible_architecture] }}"
dest: "{{ specification.paths.opensearchdash_home }}"
owner: "{{ specification.dashboards_user }}"
owner: "{{ specification.dashboards_os_user }}"
remote_src: yes
extra_opts:
- --strip-components=1
Expand All @@ -52,7 +52,7 @@
src: /etc/kibana/kibana.yml
dest: "{{ specification.paths.opensearchdash_conf_dir }}/opensearch_dashboards.yml"
remote_src: yes
owner: "{{ specification.dashboards_user }}"
owner: "{{ specification.dashboards_os_user }}"
group: root
mode: ug=rw,o=
backup: yes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
fail:
msg: "Are you trying to migrate from ODFE ( opensearch_vars.specification.odfe_migration: true ) on an already migrated server?"
when:
- opensearch_vars.specification.odfe_migration == true
- opensearch_vars.specification.odfe_migration


- name: ODFE migr | Set existing_config facts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ kind: configuration/opensearch-dashboards
title: "OpenSearch-Dashboards"
name: default
specification:
dashboards_user: opensearchdboard
dashboards_os_user: opensearchdboard
dashboards_password: PASSWORD_TO_CHANGE
paths:
opensearchdash_home: /usr/share/opensearch-dashboards
Expand Down

0 comments on commit b272dde

Please sign in to comment.