Compare commits
No commits in common. "master" and "v1.2.0" have entirely different histories.
43
CHANGELOG.md
43
CHANGELOG.md
|
@ -1,45 +1,3 @@
|
||||||
## v1.5.0
|
|
||||||
### Enhancements
|
|
||||||
|
|
||||||
* Repository version 11.0.0.0 for Debian Bookworm and Ubuntu Jammy.
|
|
||||||
|
|
||||||
## v1.4.1
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
* Use flatten to manage packages list.
|
|
||||||
* Prefix module with "ansible.builtin.".
|
|
||||||
|
|
||||||
## v1.4.0
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
* Use key_url instead of [deprecated SKS keyserver](https://sks-keyservers.net/).
|
|
||||||
* Truthy warnings with ansible-lint.
|
|
||||||
|
|
||||||
### Enhancements
|
|
||||||
|
|
||||||
* Repository version 10.1.0.0 for Debian Bullseye and Ubuntu Focal.
|
|
||||||
* Manage custom configuration for snmpd systemd service on Debian Buster.
|
|
||||||
The point is to fix the error message :
|
|
||||||
**snmpd[...]: error on subcontainer 'ia_addr' insert (-1)**
|
|
||||||
|
|
||||||
## v1.3.1
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
* Add missing libncurses5 dependency.
|
|
||||||
|
|
||||||
## v1.3.0
|
|
||||||
|
|
||||||
### Enhancements
|
|
||||||
|
|
||||||
* Skip "Ensure to remove OpenManage related packages if requested" when it's not install (with package facts).
|
|
||||||
* Repositories for Debian Jessie and Ubuntu Trusty won't need modifications anymore with new OS release.
|
|
||||||
* Add support for Debian Buster and (not tested) Ubuntu Bionic (fix #1) with version 940.
|
|
||||||
* Manage SSL lib until Debian Stretch or Ubuntu Xenial (fix #2).
|
|
||||||
* Move packages related to 910 (Debian Stretch|Ubuntu Xenial) to a specific variable.
|
|
||||||
|
|
||||||
## v1.2.0
|
## v1.2.0
|
||||||
|
|
||||||
### Enhancements
|
### Enhancements
|
||||||
|
@ -68,7 +26,6 @@ The point is to fix the error message :
|
||||||
## v1.0.1
|
## v1.0.1
|
||||||
|
|
||||||
### Fix
|
### Fix
|
||||||
|
|
||||||
* Fix E405 Remote package tasks should have a retry.
|
* Fix E405 Remote package tasks should have a retry.
|
||||||
|
|
||||||
## v1.0.0
|
## v1.0.0
|
||||||
|
|
11
README.md
11
README.md
|
@ -16,14 +16,9 @@ A role to manage OpenManage (via omreport, omconfig,…), it's web interface OMS
|
||||||
|
|
||||||
* **openmanage__repositories** : List of APT repositories that can provide OpenManage. Each entry is a dict [default : `See default/main.yml`].
|
* **openmanage__repositories** : List of APT repositories that can provide OpenManage. Each entry is a dict [default : `See default/main.yml`].
|
||||||
* **openmanage__deploy_state** : The desired state this role should achieve [default for Dell hardware : `present`].
|
* **openmanage__deploy_state** : The desired state this role should achieve [default for Dell hardware : `present`].
|
||||||
* **openmanage__install_recommends** : If recommended packages should be install [default : `false`].
|
* **openmanage__install_recommends** : If recommended packages should be install [default : `False`].
|
||||||
* **openmanage__dep_packages** : List of dependencies packages to be able to run racadm [default : `See default/main.yml`].
|
* **openmanage__dep_packages** : List of dependencies packages to be able to run racadm [default : `See default/main.yml`].
|
||||||
* **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__stretch_packages** : List of some packages specific to Debian Stretch (or Ubuntu Xenial) and previous versions [default : `See default/main.yml`].
|
|
||||||
* **openmanage__snmpd_service_name** : SNMPD service name to manage [default : `snmpd`].
|
|
||||||
* **openmanage__snmpd_service_enabled** : If the SNMPD service should be enabled at startup [default : `true`].
|
|
||||||
* **openmanage__snmpd_service_override_path** : Path to store SNMPD custom conf [default : `/etc/systemd/system/snmpd.service.d/override.conf`].
|
|
||||||
* **openmanage__snmpd_service_override_content** : Template used to provide systemd custom conf for SNMPD service [default : `etc/systemd/system/snmpd.service.d/override.conf.j2`].
|
|
||||||
* **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`].
|
* **openmanage__webgui_service_name** : Name of the systemd unit to manage web interface [default : `dsm_om_connsvc`].
|
||||||
|
@ -58,7 +53,7 @@ This role will :
|
||||||
* Start dataeng service to be able to use OpenManage applications (omreport, omconfig,…).
|
* Start dataeng service to be able to use OpenManage applications (omreport, omconfig,…).
|
||||||
* Install and enable web interface on https://<ip_address>:1311 if requested.
|
* Install and enable web interface on https://<ip_address>:1311 if requested.
|
||||||
* Fix idrac7's executable permissions.
|
* Fix idrac7's executable permissions.
|
||||||
* Fix libssl error RAC1170 (until Debian Stretch or Ubuntu Xenial).
|
* Fix libssl error RAC1170.
|
||||||
* Set up symlinks to be able to run apps from $PATH.
|
* Set up symlinks to be able to run apps from $PATH.
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
@ -69,8 +64,6 @@ But feel free to send issue/PR here :)
|
||||||
|
|
||||||
Thanks to this [hook][gogs to github hook], Github automatically got updates from our [Gogs instance][openmanage source] :)
|
Thanks to this [hook][gogs to github hook], Github automatically got updates from our [Gogs instance][openmanage source] :)
|
||||||
|
|
||||||
Thanks to @roumano
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
[WTFPL][wtfpl website]
|
[WTFPL][wtfpl website]
|
||||||
|
|
|
@ -14,60 +14,24 @@
|
||||||
# apt_repository and apt_key.
|
# apt_repository and apt_key.
|
||||||
#
|
#
|
||||||
openmanage__repositories:
|
openmanage__repositories:
|
||||||
# Version 10100 - for Debian Bookworm and Ubuntu Jammy [[[
|
# Version 910 - for Debian Stretch and Ubuntu Xenial
|
||||||
# Force using Focal repo as Bookworm repo doesn't exist and Jammy is based on Debian Bookworm
|
|
||||||
- repo: 'deb http://linux.dell.com/repo/community/openmanage/11000/jammy jammy main'
|
|
||||||
mode: '0644'
|
|
||||||
filename: 'dell.openmanage'
|
|
||||||
key_id: '1285491434D8786F'
|
|
||||||
key_url: 'https://linux.dell.com/repo/pgp_pubkeys/0x1285491434D8786F.asc'
|
|
||||||
state: '{{ openmanage__deploy_state
|
|
||||||
if (ansible_distribution_release in ["bookworm", "jammy"])
|
|
||||||
else "absent" }}'
|
|
||||||
# ]]]
|
|
||||||
# Version 10100 - for Debian Bullseye and Ubuntu Focal [[[
|
|
||||||
# Force using Focal repo as Bullseye repo doesn't exist and Focal is based on Debian Bullseye
|
|
||||||
- repo: 'deb http://linux.dell.com/repo/community/openmanage/10100/focal focal main'
|
|
||||||
mode: '0644'
|
|
||||||
filename: 'dell.openmanage'
|
|
||||||
key_id: '1285491434D8786F'
|
|
||||||
key_url: 'https://linux.dell.com/repo/pgp_pubkeys/0x1285491434D8786F.asc'
|
|
||||||
state: '{{ openmanage__deploy_state
|
|
||||||
if (ansible_distribution_release in ["bullseye", "focal"])
|
|
||||||
else "absent" }}'
|
|
||||||
# ]]]
|
|
||||||
# Version 940 - for Debian Buster and Ubuntu Bionic [[[
|
|
||||||
# Force using Bionic repo as Buster repo doesn't exist and Bionic is based on Debian Buster
|
|
||||||
- repo: 'deb http://linux.dell.com/repo/community/openmanage/940/bionic bionic main'
|
|
||||||
mode: '0644'
|
|
||||||
filename: 'dell.openmanage'
|
|
||||||
key_id: '1285491434D8786F'
|
|
||||||
key_url: 'https://linux.dell.com/repo/pgp_pubkeys/0x1285491434D8786F.asc'
|
|
||||||
state: '{{ openmanage__deploy_state
|
|
||||||
if (ansible_distribution_release in ["buster", "bionic"])
|
|
||||||
else "absent" }}'
|
|
||||||
# ]]]
|
|
||||||
# Version 910 - for Debian Stretch and Ubuntu Xenial [[[
|
|
||||||
- repo: 'deb http://linux.dell.com/repo/community/openmanage/910/{{ ansible_distribution_release }} {{ ansible_distribution_release }} main'
|
- repo: 'deb http://linux.dell.com/repo/community/openmanage/910/{{ ansible_distribution_release }} {{ ansible_distribution_release }} main'
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
filename: 'dell.openmanage'
|
filename: 'dell.openmanage'
|
||||||
key_id: '1285491434D8786F'
|
key_id: '1285491434D8786F'
|
||||||
key_url: 'https://linux.dell.com/repo/pgp_pubkeys/0x1285491434D8786F.asc'
|
key_keyserver: 'pool.sks-keyservers.net'
|
||||||
state: '{{ openmanage__deploy_state
|
state: '{{ openmanage__deploy_state
|
||||||
if (ansible_distribution_release in ["stretch", "xenial"])
|
if (ansible_distribution_release in ["stretch", "xenial"])
|
||||||
else "absent" }}'
|
else "absent" }}'
|
||||||
# ]]]
|
# Previous version for Debian until Jessie and Ubuntu until Trusty
|
||||||
# Previous OpenManage version for Debian until Jessie and Ubuntu until Trusty [[[
|
|
||||||
- repo: 'deb http://linux.dell.com/repo/community/debian/dists/{{ ansible_distribution_release }} {{ ansible_distribution_release }} openmanage'
|
- repo: 'deb http://linux.dell.com/repo/community/debian/dists/{{ ansible_distribution_release }} {{ ansible_distribution_release }} openmanage'
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
filename: 'dell.openmanage'
|
filename: 'dell.openmanage'
|
||||||
key_id: '1285491434D8786F'
|
key_id: '1285491434D8786F'
|
||||||
key_url: 'https://linux.dell.com/repo/pgp_pubkeys/0x1285491434D8786F.asc'
|
key_keyserver: 'pool.sks-keyservers.net'
|
||||||
state: '{{ openmanage__deploy_state
|
state: '{{ openmanage__deploy_state
|
||||||
if ((ansible_distribution == "Debian" and ansible_distribution_major_version is version("8", "<=")) or
|
if (ansible_distribution_release not in ["stretch", "xenial"])
|
||||||
(ansible_distribution == "Ubuntu" and ansible_distribution_version is version("14.04", "<=")))
|
|
||||||
else "absent" }}'
|
else "absent" }}'
|
||||||
# ]]]
|
|
||||||
# ]]]
|
# ]]]
|
||||||
# ]]]
|
# ]]]
|
||||||
# Installation and Packages [[[
|
# Installation and Packages [[[
|
||||||
|
@ -92,12 +56,12 @@ openmanage__deploy_state: '{{ "present"
|
||||||
#
|
#
|
||||||
# If recommended packages should be install ? Possible options :
|
# If recommended packages should be install ? Possible options :
|
||||||
#
|
#
|
||||||
# ``false``
|
# ``False``
|
||||||
# Default.
|
# Default.
|
||||||
#
|
#
|
||||||
# ``true``
|
# ``True``
|
||||||
#
|
#
|
||||||
openmanage__install_recommends: false
|
openmanage__install_recommends: False
|
||||||
# ]]]
|
# ]]]
|
||||||
# .. envvar:: openmanage__dep_packages [[[
|
# .. envvar:: openmanage__dep_packages [[[
|
||||||
#
|
#
|
||||||
|
@ -105,7 +69,6 @@ openmanage__install_recommends: false
|
||||||
#
|
#
|
||||||
openmanage__dep_packages:
|
openmanage__dep_packages:
|
||||||
- 'libargtable2-0'
|
- 'libargtable2-0'
|
||||||
- 'libncurses5'
|
|
||||||
- 'libxslt1.1'
|
- 'libxslt1.1'
|
||||||
# ]]]
|
# ]]]
|
||||||
# .. envvar:: openmanage__base_packages [[[
|
# .. envvar:: openmanage__base_packages [[[
|
||||||
|
@ -113,27 +76,17 @@ openmanage__dep_packages:
|
||||||
# List of base packages to install.
|
# List of base packages to install.
|
||||||
#
|
#
|
||||||
openmanage__base_packages:
|
openmanage__base_packages:
|
||||||
|
- 'libssl1.0.0'
|
||||||
- 'srvadmin-base'
|
- 'srvadmin-base'
|
||||||
- 'srvadmin-idracadm7'
|
- 'srvadmin-idracadm7'
|
||||||
- 'srvadmin-idracadm8'
|
- 'srvadmin-idracadm8'
|
||||||
|
- 'srvadmin-idrac-ivmcli'
|
||||||
|
- 'srvadmin-idrac-vmcli'
|
||||||
- 'srvadmin-omcommon'
|
- 'srvadmin-omcommon'
|
||||||
- 'srvadmin-server-cli'
|
- 'srvadmin-server-cli'
|
||||||
- 'srvadmin-server-snmp'
|
- 'srvadmin-server-snmp'
|
||||||
- 'srvadmin-storageservices'
|
- 'srvadmin-storageservices'
|
||||||
# ]]]
|
# ]]]
|
||||||
# .. envvar:: openmanage__stretch_packages [[[
|
|
||||||
#
|
|
||||||
# List of some packages specific to Debian Stretch (or Ubuntu Xenial)
|
|
||||||
# and previous versions.
|
|
||||||
#
|
|
||||||
# Contains required packages (libssl…) and some packages that are no
|
|
||||||
# longer presents in more recent versions of OpenManage.
|
|
||||||
#
|
|
||||||
openmanage__stretch_packages:
|
|
||||||
- 'libssl1.0.0'
|
|
||||||
- 'srvadmin-idrac-ivmcli'
|
|
||||||
- 'srvadmin-idrac-vmcli'
|
|
||||||
# ]]]
|
|
||||||
# .. envvar:: openmanage__webgui_state [[[
|
# .. envvar:: openmanage__webgui_state [[[
|
||||||
#
|
#
|
||||||
# What is the desired state for web interface of OMSA ? Possible options :
|
# What is the desired state for web interface of OMSA ? Possible options :
|
||||||
|
@ -155,37 +108,6 @@ openmanage__webgui_packages:
|
||||||
- 'srvadmin-webserver'
|
- 'srvadmin-webserver'
|
||||||
# ]]]
|
# ]]]
|
||||||
|
|
||||||
# ]]]
|
|
||||||
# Service management [[[
|
|
||||||
# ----------------------
|
|
||||||
|
|
||||||
# .. envvar:: openmanage__snmpd_service_name [[[
|
|
||||||
#
|
|
||||||
# SNMPD service name to manage.
|
|
||||||
openmanage__snmpd_service_name: 'snmpd'
|
|
||||||
# ]]]
|
|
||||||
# .. envvar:: openmanage__snmpd_service_enabled [[[
|
|
||||||
#
|
|
||||||
# If the SNMPD service should be enabled at startup ? Possible options are :
|
|
||||||
#
|
|
||||||
# ``true``
|
|
||||||
# Default. The service is enabled.
|
|
||||||
#
|
|
||||||
# ``false``
|
|
||||||
# The service is disabled from startup.
|
|
||||||
openmanage__snmpd_service_enabled: true
|
|
||||||
# ]]]
|
|
||||||
# .. envvar:: openmanage__snmpd_service_override_path [[[
|
|
||||||
#
|
|
||||||
# Path to store SNMPD custom conf.
|
|
||||||
openmanage__snmpd_service_override_path: '/etc/systemd/system/snmpd.service.d/override.conf'
|
|
||||||
# ]]]
|
|
||||||
# .. envvar:: openmanage__snmpd_service_override_content [[[
|
|
||||||
#
|
|
||||||
# Template used to provide systemd custom conf for SNMPD service.
|
|
||||||
openmanage__snmpd_service_override_content: 'etc/systemd/system/snmpd.service.d/override.conf.j2'
|
|
||||||
# ]]]
|
|
||||||
|
|
||||||
# ]]]
|
# ]]]
|
||||||
# Web interface [[[
|
# Web interface [[[
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
|
|
|
@ -1,17 +1,6 @@
|
||||||
---
|
---
|
||||||
# handlers file for openmanage
|
# handlers file for openmanage
|
||||||
|
|
||||||
- name: Restart snmpd service
|
|
||||||
systemd:
|
|
||||||
daemon_reload: '{{ (openmanage__snmpd_register_systemd_custom.changed | default(False)) }}'
|
|
||||||
state: '{{ "restarted" if (openmanage__snmpd_service_enabled)
|
|
||||||
else "stopped" }}'
|
|
||||||
name: '{{ openmanage__snmpd_service_name }}'
|
|
||||||
enabled: '{{ openmanage__snmpd_service_enabled }}'
|
|
||||||
when:
|
|
||||||
- openmanage__deploy_state == "present"
|
|
||||||
- ansible_service_mgr == 'systemd'
|
|
||||||
|
|
||||||
- name: restart dataeng service
|
- name: restart dataeng service
|
||||||
service:
|
service:
|
||||||
name: 'dataeng'
|
name: 'dataeng'
|
||||||
|
|
|
@ -4,8 +4,6 @@ dependencies: []
|
||||||
|
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
author: "Jérémy Gardais"
|
author: "Jérémy Gardais"
|
||||||
namespace: ipr-cnrs
|
|
||||||
role_name: openmanage
|
|
||||||
description: "Setup Openmanage"
|
description: "Setup Openmanage"
|
||||||
license: WTFPL
|
license: WTFPL
|
||||||
company: IPR
|
company: IPR
|
||||||
|
@ -14,8 +12,6 @@ galaxy_info:
|
||||||
platforms:
|
platforms:
|
||||||
- name: Debian
|
- name: Debian
|
||||||
versions:
|
versions:
|
||||||
- bullseye
|
|
||||||
- buster
|
|
||||||
- stretch
|
- stretch
|
||||||
galaxy_tags:
|
galaxy_tags:
|
||||||
- system
|
- system
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
# Manage repository [[[1
|
# Manage repository [[[1
|
||||||
## Add repository
|
## Add repository
|
||||||
- name: Add OpenManage repository
|
- name: Add OpenManage repository
|
||||||
ansible.builtin.apt_repository:
|
apt_repository:
|
||||||
update_cache: false
|
update_cache: False
|
||||||
repo: '{{ item.repo }}'
|
repo: '{{ item.repo }}'
|
||||||
mode: '{{ item.mode | d(omit) }}'
|
mode: '{{ item.mode | d(omit) }}'
|
||||||
filename: '{{ item.filename | d(omit) }}'
|
filename: '{{ item.filename | d(omit) }}'
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
## Add repository key
|
## Add repository key
|
||||||
### Don't remove the APT key, cause differents repos can have the same key
|
### Don't remove the APT key, cause differents repos can have the same key
|
||||||
- name: Add OpenManage repo key
|
- name: Add OpenManage repo key
|
||||||
ansible.builtin.apt_key:
|
apt_key:
|
||||||
url: '{{ item.key_url | d(omit) }}'
|
url: '{{ item.key_url | d(omit) }}'
|
||||||
id: '{{ item.key_id | d(omit) }}'
|
id: '{{ item.key_id | d(omit) }}'
|
||||||
keyring: '/etc/apt/trusted.gpg.d/linux.dell.com.gpg'
|
keyring: '/etc/apt/trusted.gpg.d/linux.dell.com.gpg'
|
||||||
|
@ -33,12 +33,12 @@
|
||||||
|
|
||||||
## Update cache
|
## Update cache
|
||||||
- name: Update APT cache
|
- name: Update APT cache
|
||||||
ansible.builtin.apt:
|
apt:
|
||||||
update_cache: '{{ true
|
update_cache: '{{ True
|
||||||
if (openmanage__register_key is changed or
|
if (openmanage__register_key is changed or
|
||||||
openmanage__register_repositories is changed)
|
openmanage__register_repositories is changed)
|
||||||
else
|
else
|
||||||
false }}'
|
False }}'
|
||||||
register: openmanage__register_update
|
register: openmanage__register_update
|
||||||
until: openmanage__register_update is success
|
until: openmanage__register_update is success
|
||||||
when: (openmanage__deploy_state == "present")
|
when: (openmanage__deploy_state == "present")
|
||||||
|
@ -46,106 +46,69 @@
|
||||||
# Manage packages [[[1
|
# Manage packages [[[1
|
||||||
## Manage depencies packages
|
## Manage depencies packages
|
||||||
- name: Ensure dependencies are present
|
- name: Ensure dependencies are present
|
||||||
ansible.builtin.package:
|
package:
|
||||||
name: '{{ openmanage__dep_packages | flatten }}'
|
name: '{{ item }}'
|
||||||
state: "present"
|
state: "present"
|
||||||
install_recommends: '{{ openmanage__install_recommends | bool }}'
|
install_recommends: '{{ openmanage__install_recommends | bool }}'
|
||||||
|
with_flattened:
|
||||||
|
- '{{ openmanage__dep_packages | to_nice_json }}'
|
||||||
register: pkg_dep_result
|
register: pkg_dep_result
|
||||||
until: pkg_dep_result is success
|
until: pkg_dep_result is success
|
||||||
when: (openmanage__deploy_state == "present")
|
when: (openmanage__deploy_state == "present")
|
||||||
|
|
||||||
## Manage Debian Stretch (or Ubuntu Xenial) specific packages
|
|
||||||
- name: "Ensure 910 specific packages (Stretch|Xenial) are in there desired state"
|
|
||||||
ansible.builtin.package:
|
|
||||||
name: '{{ openmanage__stretch_packages | flatten }}'
|
|
||||||
state: "present"
|
|
||||||
install_recommends: '{{ openmanage__install_recommends | bool }}'
|
|
||||||
register: pkg_stretch_result
|
|
||||||
until: pkg_stretch_result is success
|
|
||||||
when: (openmanage__deploy_state == "present" and
|
|
||||||
( (ansible_distribution == "Debian" and ansible_distribution_major_version is version("9", "<=")) or
|
|
||||||
(ansible_distribution == "Ubuntu" and ansible_distribution_version is version("16.04", "<="))))
|
|
||||||
|
|
||||||
## Manage base system packages
|
## Manage base system packages
|
||||||
- name: Ensure base packages are in there desired state
|
- name: Ensure base packages are in there desired state
|
||||||
ansible.builtin.package:
|
package:
|
||||||
name: '{{ openmanage__base_packages | flatten }}'
|
name: '{{ item }}'
|
||||||
state: '{{ "present" if (openmanage__deploy_state == "present") else "absent" }}'
|
state: '{{ "present" if (openmanage__deploy_state == "present") else "absent" }}'
|
||||||
install_recommends: '{{ openmanage__install_recommends | bool }}'
|
install_recommends: '{{ openmanage__install_recommends | bool }}'
|
||||||
|
with_flattened:
|
||||||
|
- '{{ openmanage__base_packages | to_nice_json }}'
|
||||||
register: pkg_base_result
|
register: pkg_base_result
|
||||||
until: pkg_base_result is success
|
until: pkg_base_result is success
|
||||||
|
|
||||||
## Manage OMSA webgui packages
|
## Manage OMSA webgui packages
|
||||||
- name: Ensure OMSA-webgui packages are in there desired state
|
- name: Ensure OMSA-webgui packages are in there desired state
|
||||||
ansible.builtin.package:
|
package:
|
||||||
name: '{{ openmanage__webgui_packages | flatten }}'
|
name: '{{ item }}'
|
||||||
state: '{{ "present" if (openmanage__deploy_state == "present") and
|
state: '{{ "present" if (openmanage__deploy_state == "present") and
|
||||||
(openmanage__webgui_state == "present")
|
(openmanage__webgui_state == "present")
|
||||||
else "absent" }}'
|
else "absent" }}'
|
||||||
install_recommends: '{{ openmanage__install_recommends | bool }}'
|
install_recommends: '{{ openmanage__install_recommends | bool }}'
|
||||||
|
with_flattened:
|
||||||
|
- '{{ 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']
|
notify: ['restart webgui service']
|
||||||
|
|
||||||
## Remove all OpenManage packages if requested
|
## Remove all OpenManage packages if requested
|
||||||
- name: Gather the Package facts
|
|
||||||
ansible.builtin.package_facts:
|
|
||||||
manager: auto
|
|
||||||
|
|
||||||
- name: Ensure to remove OpenManage related packages if requested
|
- name: Ensure to remove OpenManage related packages if requested
|
||||||
ansible.builtin.package:
|
package:
|
||||||
name: 'srvadmin*'
|
name: 'srvadmin*'
|
||||||
state: "absent"
|
state: "absent"
|
||||||
register: pkg_remove_result
|
register: pkg_remove_result
|
||||||
until: pkg_remove_result is success
|
until: pkg_remove_result is success
|
||||||
when:
|
when: (openmanage__deploy_state == "absent")
|
||||||
- (openmanage__deploy_state == "absent")
|
|
||||||
- "'srvadmin' in ansible_facts.packages"
|
|
||||||
|
|
||||||
# Manage configuration [[[1
|
|
||||||
- name: Create SNMPD custom directory for systemd service
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ openmanage__snmpd_service_override_path | dirname }}"
|
|
||||||
state: directory
|
|
||||||
mode: '0755'
|
|
||||||
when:
|
|
||||||
- openmanage__deploy_state == "present"
|
|
||||||
- ansible_distribution_release in ["buster"]
|
|
||||||
|
|
||||||
- name: Add SNMPD systemd custom configuration
|
|
||||||
ansible.builtin.template:
|
|
||||||
src: '{{ openmanage__snmpd_service_override_content }}'
|
|
||||||
dest: '{{ openmanage__snmpd_service_override_path }}'
|
|
||||||
owner: 'root'
|
|
||||||
group: 'root'
|
|
||||||
mode: '0644'
|
|
||||||
register: openmanage__snmpd_register_systemd_custom
|
|
||||||
when:
|
|
||||||
- openmanage__deploy_state == "present"
|
|
||||||
- ansible_distribution_release in ["buster"]
|
|
||||||
notify: ['Restart snmpd service']
|
|
||||||
|
|
||||||
# Executable [[[1
|
# Executable [[[1
|
||||||
## Fix some permissions
|
## Fix some permissions
|
||||||
- name: Ensure Executables can be run
|
- name: Ensure Executables can be run
|
||||||
ansible.builtin.file:
|
file:
|
||||||
path: /opt/dell/srvadmin/sbin/racadm-wrapper-idrac7
|
path: /opt/dell/srvadmin/sbin/racadm-wrapper-idrac7
|
||||||
mode: 0755
|
mode: 0755
|
||||||
when: (openmanage__deploy_state == "present")
|
when: (openmanage__deploy_state == "present")
|
||||||
|
|
||||||
## Fix RAC1170 error
|
## Fix RAC1170 error
|
||||||
- name: Fix libssl error RAC1170
|
- name: Fix libssl error RAC1170
|
||||||
ansible.builtin.file:
|
file:
|
||||||
src: "/usr/lib/x86_64-linux-gnu/libssl.so.1.0.2"
|
src: "/usr/lib/x86_64-linux-gnu/libssl.so.1.0.2"
|
||||||
path: "/opt/dell/srvadmin/lib64/libssl.so"
|
path: "/opt/dell/srvadmin/lib64/libssl.so"
|
||||||
state: link
|
state: link
|
||||||
when: (openmanage__deploy_state == "present" and
|
when: (openmanage__deploy_state == "present")
|
||||||
( (ansible_distribution == "Debian" and ansible_distribution_major_version is version("9", "<=")) or
|
|
||||||
(ansible_distribution == "Ubuntu" and ansible_distribution_version is version("16.04", "<="))))
|
|
||||||
|
|
||||||
## Manage symlinks for OpenManage/racadm apps
|
## Manage symlinks for OpenManage/racadm apps
|
||||||
- name: Ensure some Executables are in PATH
|
- name: Ensure some Executables are in PATH
|
||||||
ansible.builtin.file:
|
file:
|
||||||
src: "/opt/dell/srvadmin/sbin/{{ item }}"
|
src: "/opt/dell/srvadmin/sbin/{{ item }}"
|
||||||
path: "/bin/{{ item }}"
|
path: "/bin/{{ item }}"
|
||||||
state: "link"
|
state: "link"
|
||||||
|
@ -158,7 +121,7 @@
|
||||||
when: (openmanage__deploy_state == "present")
|
when: (openmanage__deploy_state == "present")
|
||||||
|
|
||||||
- name: Remove Executables symlinks
|
- name: Remove Executables symlinks
|
||||||
ansible.builtin.file:
|
file:
|
||||||
path: "/bin/{{ item }}"
|
path: "/bin/{{ item }}"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
with_items:
|
with_items:
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
# {{ ansible_managed }}
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
# Fix error message: snmpd[...]: error on subcontainer 'ia_addr' insert (-1)
|
|
||||||
# By fixing logging options (-Lsd to -LS6d).
|
|
||||||
ExecStart=
|
|
||||||
ExecStart=/usr/sbin/snmpd -LS6d -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f -p /run/snmpd.pid
|
|
Loading…
Reference in New Issue