Skip to content

Commit

Permalink
Make start service optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfgang Hotwagner committed Apr 23, 2024
1 parent 67c7402 commit ee9830a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 14 deletions.
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
#
# Last Changes:
# Wolfgang Hotwagner updated this file on 19. April 2024
# Wolfgang Hotwagner updated this file on 23. April 2024
#

os_nodes: |-
Expand Down
20 changes: 7 additions & 13 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
---
#
# Last Changes:
# Wolfgang Hotwagner updated this file on 23. April 2024
#

# Disabling for Amazon Linux 2 as selinux is disabled by default.
- name: Disable the selinux
Expand All @@ -12,16 +16,6 @@
- name: Include dashboards installation
ansible.builtin.import_tasks: dashboards.yml

- name: Make sure opensearch dashboards is started
ansible.builtin.service:
name: dashboards
state: started
enabled: true

- name: Get all the installed dashboards plugins
ansible.builtin.command: "sudo -u {{ os_dashboards_user }} {{ os_plugin_bin_path }} list"
register: list_plugins

- name: Show all the installed dashboards plugins
ansible.builtin.debug:
msg: "{{ list_plugins.stdout }}"
- name: Include tests
ansible.builtin.import_tasks: test.yml
when: os_test is truthy
18 changes: 18 additions & 0 deletions tasks/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
#
# Last Changes:
# Wolfgang Hotwagner updated this file on 23. April 2024
#
- name: Make sure opensearch dashboards is started
ansible.builtin.service:
name: dashboards
state: started
enabled: true

- name: Get all the installed dashboards plugins
ansible.builtin.command: "sudo -u {{ os_dashboards_user }} {{ os_plugin_bin_path }} list"
register: list_plugins

- name: Show all the installed dashboards plugins
ansible.builtin.debug:
msg: "{{ list_plugins.stdout }}"

0 comments on commit ee9830a

Please sign in to comment.