Manage systemd service that provide the web interface

This commit is contained in:
Jeremy Gardais 2019-03-28 16:32:58 +01:00
parent d97d73439f
commit 570d6ca942
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
5 changed files with 25 additions and 0 deletions

View File

@ -5,6 +5,7 @@
* Install idrac8 (and above) package by default. * Install idrac8 (and above) package by default.
* Install libssl.1.0.0 from Dell repo as base package. * Install libssl.1.0.0 from Dell repo as base package.
* Install libxslt1.1 as dependency for om.* apps. * Install libxslt1.1 as dependency for om.* apps.
* Manage systemd service that provide the web interface.
## v1.0.2 ## v1.0.2

View File

@ -21,6 +21,7 @@ A role to manage Openmanage installation and configuration.
* **openmanage__base_packages**: List of base packages for all racadm base usage [default: `See default/main.yml`]. * **openmanage__base_packages**: List of base packages for all racadm base usage [default: `See default/main.yml`].
* **openmanage__webgui_state**: The desired state for web interface of OMSA [default : `absent`]. * **openmanage__webgui_state**: The desired state for web interface of OMSA [default : `absent`].
* **openmanage__webgui_packages**: List of packages to provide web interface to OMSA [default: `See default/main.yml`]. * **openmanage__webgui_packages**: List of packages to provide web interface to OMSA [default: `See default/main.yml`].
* **openmanage__webgui_service_name**: Name of the systemd unit to manage web interface [default: `dsm_om_connsvc`].
## Example Playbook ## Example Playbook

View File

@ -108,4 +108,15 @@ openmanage__webgui_packages:
- 'srvadmin-webserver' - 'srvadmin-webserver'
# ]]] # ]]]
# ]]]
# Web interface [[[
# -----------------------------
# .. envvar:: openmanage__webgui_service_name [[[
#
# Name of the systemd unit to manage web interface
#
openmanage__webgui_service_name: 'dsm_om_connsvc'
# ]]]
# ]]] # ]]]

11
handlers/main.yml Normal file
View File

@ -0,0 +1,11 @@
---
# handlers file for openmanage
- name: restart webgui service
service:
name: '{{ openmanage__webgui_service_name }}'
state: '{{ "restarted" if (openmanage__deploy_state == "present") and
(openmanage__webgui_state == "present")
else "stopped" }}'
enabled: '{{ "yes" if (openmanage__deploy_state == "present") and
(openmanage__webgui_state == "present")
else "no" }}'

View File

@ -76,6 +76,7 @@
- '{{ openmanage__webgui_packages | to_nice_json }}' - '{{ openmanage__webgui_packages | to_nice_json }}'
register: pkg_webgui_result register: pkg_webgui_result
until: pkg_webgui_result is success until: pkg_webgui_result is success
notify: ['restart webgui service']
# Executable [[[1 # Executable [[[1
## Fix some permissions ## Fix some permissions