Compare commits
31 Commits
Author | SHA1 | Date |
---|---|---|
|
477308b626 | |
|
9f301d53cf | |
|
dbe4d60806 | |
|
c515e9ceec | |
|
134640f473 | |
|
0a00fd393d | |
|
04f7de3fe4 | |
|
adc6fa1f7b | |
|
4b2776932f | |
|
2f46c241c6 | |
|
640bc8d9ec | |
|
58be94860f | |
|
200f265c6c | |
|
462d94a3f7 | |
|
e9ed83961e | |
|
3eaab13b98 | |
|
2531667af0 | |
|
8c02772272 | |
|
63ccf65ef1 | |
|
bec4a29bc7 | |
|
40f2a09c8f | |
|
4f8c94a131 | |
|
9b4b1b3efa | |
|
c2cf7ec8bf | |
|
6cd69cfacb | |
|
570d6ca942 | |
|
d97d73439f | |
|
e112630ca1 | |
|
4a167662c0 | |
|
6d6c391c53 | |
|
d6e622e608 |
68
CHANGELOG.md
68
CHANGELOG.md
|
@ -1,6 +1,74 @@
|
|||
## 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
|
||||
|
||||
### Enhancements
|
||||
|
||||
* Install apt_key only if deploy_state = present.
|
||||
* Remove all OpenManage related packages if deploy_state = absent.
|
||||
* Packages installation don't need to restart service.
|
||||
|
||||
## v1.1.0
|
||||
|
||||
### Enhancements
|
||||
* Allow to install web interface for OMSA.
|
||||
* Install idrac8 (and above) package by default.
|
||||
* Install libssl.1.0.0 from Dell repo as base package.
|
||||
* Install libxslt1.1 as dependency for om.* apps.
|
||||
* Manage systemd service that provide the web interface.
|
||||
* Manage dataeng service to be able to use OpenManage apps.
|
||||
* Manage apps's symlinks to be able to run from $PATH.
|
||||
|
||||
## v1.0.2
|
||||
|
||||
### Fix
|
||||
|
||||
* Set the correct issue url.
|
||||
|
||||
## v1.0.1
|
||||
|
||||
### Fix
|
||||
|
||||
* Fix E405 Remote package tasks should have a retry.
|
||||
|
||||
## v1.0.0
|
||||
|
|
31
README.md
31
README.md
|
@ -10,15 +10,23 @@
|
|||
|
||||
## Overview
|
||||
|
||||
A role to manage Openmanage installation and configuration.
|
||||
A role to manage OpenManage (via omreport, omconfig,…), it's web interface OMSA (OpenManage Server Administrator) and iDrac (with racadm)
|
||||
|
||||
## Role Variables
|
||||
|
||||
* **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__install_recommends** : If recommended packages should be install. [default : `False`].
|
||||
* **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__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__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_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
|
||||
|
||||
|
@ -31,14 +39,27 @@ A role to manage Openmanage installation and configuration.
|
|||
tags: ['role::openmanage', 'ipr', 'idrac']
|
||||
```
|
||||
|
||||
* Enable web interface for OMSA (on https://<ip_address>:1311/) :
|
||||
|
||||
``` yaml
|
||||
- hosts: mynode.DOMAIN
|
||||
roles:
|
||||
- role: ipr-cnrs.openmanage
|
||||
openmanage__webgui_state: "present"
|
||||
tags: ['role::openmanage', 'ipr', 'idrac']
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
This role will :
|
||||
* Add an APT repository in order to provide OpenManage.
|
||||
* Install dependencies packages.
|
||||
* Install basic packages for all racadm usage.
|
||||
* Start dataeng service to be able to use OpenManage applications (omreport, omconfig,…).
|
||||
* Install and enable web interface on https://<ip_address>:1311 if requested.
|
||||
* Fix idrac7's executable permissions.
|
||||
* Fix libssl error RAC1170.
|
||||
* Fix libssl error RAC1170 (until Debian Stretch or Ubuntu Xenial).
|
||||
* Set up symlinks to be able to run apps from $PATH.
|
||||
|
||||
## Development
|
||||
|
||||
|
@ -48,6 +69,8 @@ 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 @roumano
|
||||
|
||||
## License
|
||||
|
||||
[WTFPL][wtfpl website]
|
||||
|
|
|
@ -14,24 +14,60 @@
|
|||
# apt_repository and apt_key.
|
||||
#
|
||||
openmanage__repositories:
|
||||
# Version 910 - for Debian Stretch and Ubuntu Xenial
|
||||
# Version 10100 - for Debian Bookworm and Ubuntu Jammy [[[
|
||||
# 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'
|
||||
mode: '0644'
|
||||
filename: 'dell.openmanage'
|
||||
key_id: '1285491434D8786F'
|
||||
key_keyserver: 'pool.sks-keyservers.net'
|
||||
key_url: 'https://linux.dell.com/repo/pgp_pubkeys/0x1285491434D8786F.asc'
|
||||
state: '{{ openmanage__deploy_state
|
||||
if (ansible_distribution_release in ["stretch", "xenial"])
|
||||
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'
|
||||
mode: '0644'
|
||||
filename: 'dell.openmanage'
|
||||
key_id: '1285491434D8786F'
|
||||
key_keyserver: 'pool.sks-keyservers.net'
|
||||
key_url: 'https://linux.dell.com/repo/pgp_pubkeys/0x1285491434D8786F.asc'
|
||||
state: '{{ openmanage__deploy_state
|
||||
if (ansible_distribution_release not in ["stretch", "xenial"])
|
||||
if ((ansible_distribution == "Debian" and ansible_distribution_major_version is version("8", "<=")) or
|
||||
(ansible_distribution == "Ubuntu" and ansible_distribution_version is version("14.04", "<=")))
|
||||
else "absent" }}'
|
||||
# ]]]
|
||||
# ]]]
|
||||
# ]]]
|
||||
# Installation and Packages [[[
|
||||
|
@ -56,12 +92,12 @@ openmanage__deploy_state: '{{ "present"
|
|||
#
|
||||
# If recommended packages should be install ? Possible options :
|
||||
#
|
||||
# ``False``
|
||||
# ``false``
|
||||
# Default.
|
||||
#
|
||||
# ``True``
|
||||
# ``true``
|
||||
#
|
||||
openmanage__install_recommends: False
|
||||
openmanage__install_recommends: false
|
||||
# ]]]
|
||||
# .. envvar:: openmanage__dep_packages [[[
|
||||
#
|
||||
|
@ -69,6 +105,8 @@ openmanage__install_recommends: False
|
|||
#
|
||||
openmanage__dep_packages:
|
||||
- 'libargtable2-0'
|
||||
- 'libncurses5'
|
||||
- 'libxslt1.1'
|
||||
# ]]]
|
||||
# .. envvar:: openmanage__base_packages [[[
|
||||
#
|
||||
|
@ -77,18 +115,86 @@ openmanage__dep_packages:
|
|||
openmanage__base_packages:
|
||||
- 'srvadmin-base'
|
||||
- 'srvadmin-idracadm7'
|
||||
- 'srvadmin-idrac-ivmcli'
|
||||
- 'srvadmin-idrac-vmcli'
|
||||
- 'srvadmin-idracadm8'
|
||||
- 'srvadmin-omcommon'
|
||||
- 'srvadmin-server-cli'
|
||||
- 'srvadmin-server-snmp'
|
||||
- 'srvadmin-storageservices'
|
||||
# ]]]
|
||||
# .. envvar:: openmanage__idrac8_packages [[[
|
||||
# .. envvar:: openmanage__stretch_packages [[[
|
||||
#
|
||||
# List of idrac8 packages to install.
|
||||
# List of some packages specific to Debian Stretch (or Ubuntu Xenial)
|
||||
# and previous versions.
|
||||
#
|
||||
openmanage__idrac8_packages:
|
||||
- 'srvadmin-idracadm8'
|
||||
# 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 [[[
|
||||
#
|
||||
# What is the desired state for web interface of OMSA ? Possible options :
|
||||
#
|
||||
# ``absent``
|
||||
# Default. Ensure that service is stopped and packages related to web interface
|
||||
# are uninstalled.
|
||||
#
|
||||
# ``present``
|
||||
# Install related packages and start the service.
|
||||
#
|
||||
openmanage__webgui_state: "absent"
|
||||
# ]]]
|
||||
# .. envvar:: openmanage__webgui_packages [[[
|
||||
#
|
||||
# List of packages to provide web interface to OMSA.
|
||||
#
|
||||
openmanage__webgui_packages:
|
||||
- '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 [[[
|
||||
# -----------------------------
|
||||
|
||||
# .. envvar:: openmanage__webgui_service_name [[[
|
||||
#
|
||||
# Name of the systemd unit to manage web interface
|
||||
#
|
||||
openmanage__webgui_service_name: 'dsm_om_connsvc'
|
||||
# ]]]
|
||||
|
||||
# ]]]
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
# 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
|
||||
service:
|
||||
name: 'dataeng'
|
||||
state: '{{ "restarted" if (openmanage__deploy_state == "present")
|
||||
else "stopped" }}'
|
||||
enabled: '{{ "yes" if (openmanage__deploy_state == "present")
|
||||
else "no" }}'
|
||||
|
||||
- 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" }}'
|
|
@ -4,14 +4,18 @@ dependencies: []
|
|||
|
||||
galaxy_info:
|
||||
author: "Jérémy Gardais"
|
||||
namespace: ipr-cnrs
|
||||
role_name: openmanage
|
||||
description: "Setup Openmanage"
|
||||
license: WTFPL
|
||||
company: IPR
|
||||
issue_tracker_url: https://git.ipr.univ-rennes1.fr/cellinfo/ansible.netadata/issues
|
||||
issue_tracker_url: https://git.ipr.univ-rennes1.fr/cellinfo/ansible.openmanage/issues
|
||||
min_ansible_version: 2.6
|
||||
platforms:
|
||||
- name: Debian
|
||||
versions:
|
||||
- bullseye
|
||||
- buster
|
||||
- stretch
|
||||
galaxy_tags:
|
||||
- system
|
||||
|
|
127
tasks/main.yml
127
tasks/main.yml
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
|
||||
#
|
||||
# tasks file for netdata
|
||||
# tasks file for openmanage
|
||||
|
||||
# Manage repository [[[1
|
||||
## Add repository
|
||||
- name: Add OpenManage repository
|
||||
apt_repository:
|
||||
update_cache: False
|
||||
ansible.builtin.apt_repository:
|
||||
update_cache: false
|
||||
repo: '{{ item.repo }}'
|
||||
mode: '{{ item.mode | d(omit) }}'
|
||||
filename: '{{ item.filename | d(omit) }}'
|
||||
|
@ -18,24 +18,27 @@
|
|||
until: openmanage__register_repositories is success
|
||||
|
||||
## Add repository key
|
||||
### Don't remove the APT key, cause differents repos can have the same key
|
||||
- name: Add OpenManage repo key
|
||||
apt_key:
|
||||
ansible.builtin.apt_key:
|
||||
url: '{{ item.key_url | d(omit) }}'
|
||||
id: '{{ item.key_id | d(omit) }}'
|
||||
keyring: '/etc/apt/trusted.gpg.d/linux.dell.com.gpg'
|
||||
keyserver: '{{ item.key_keyserver | d(omit) }}'
|
||||
with_flattened:
|
||||
- '{{ openmanage__repositories }}'
|
||||
register: openmanage__register_key
|
||||
until: openmanage__register_key is success
|
||||
when: (openmanage__deploy_state == "present")
|
||||
|
||||
## Update cache
|
||||
- name: Update APT cache
|
||||
apt:
|
||||
update_cache: '{{ True
|
||||
ansible.builtin.apt:
|
||||
update_cache: '{{ true
|
||||
if (openmanage__register_key is changed or
|
||||
openmanage__register_repositories is changed)
|
||||
else
|
||||
False }}'
|
||||
false }}'
|
||||
register: openmanage__register_update
|
||||
until: openmanage__register_update is success
|
||||
when: (openmanage__deploy_state == "present")
|
||||
|
@ -43,39 +46,125 @@
|
|||
# Manage packages [[[1
|
||||
## Manage depencies packages
|
||||
- name: Ensure dependencies are present
|
||||
package:
|
||||
name: '{{ item }}'
|
||||
ansible.builtin.package:
|
||||
name: '{{ openmanage__dep_packages | flatten }}'
|
||||
state: "present"
|
||||
install_recommends: '{{ openmanage__install_recommends | bool }}'
|
||||
with_flattened:
|
||||
- '{{ openmanage__dep_packages | to_nice_json }}'
|
||||
register: pkg_dep_result
|
||||
until: pkg_dep_result is success
|
||||
when: (openmanage__deploy_state == "present")
|
||||
|
||||
## Manage base system packages
|
||||
## 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
|
||||
- name: Ensure base packages are in there desired state
|
||||
package:
|
||||
name: '{{ item }}'
|
||||
ansible.builtin.package:
|
||||
name: '{{ openmanage__base_packages | flatten }}'
|
||||
state: '{{ "present" if (openmanage__deploy_state == "present") else "absent" }}'
|
||||
install_recommends: '{{ openmanage__install_recommends | bool }}'
|
||||
with_flattened:
|
||||
- '{{ openmanage__base_packages | to_nice_json }}'
|
||||
register: pkg_base_result
|
||||
until: pkg_base_result is success
|
||||
|
||||
## Manage OMSA webgui packages
|
||||
- name: Ensure OMSA-webgui packages are in there desired state
|
||||
ansible.builtin.package:
|
||||
name: '{{ openmanage__webgui_packages | flatten }}'
|
||||
state: '{{ "present" if (openmanage__deploy_state == "present") and
|
||||
(openmanage__webgui_state == "present")
|
||||
else "absent" }}'
|
||||
install_recommends: '{{ openmanage__install_recommends | bool }}'
|
||||
register: pkg_webgui_result
|
||||
until: pkg_webgui_result is success
|
||||
notify: ['restart webgui service']
|
||||
|
||||
## 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
|
||||
ansible.builtin.package:
|
||||
name: 'srvadmin*'
|
||||
state: "absent"
|
||||
register: pkg_remove_result
|
||||
until: pkg_remove_result is success
|
||||
when:
|
||||
- (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
|
||||
## Fix some permissions
|
||||
- name: Ensure Executables can be run
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: /opt/dell/srvadmin/sbin/racadm-wrapper-idrac7
|
||||
mode: 0755
|
||||
when: (openmanage__deploy_state == "present")
|
||||
|
||||
## Fix RAC1170 error
|
||||
- name: Fix libssl error RAC1170
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
src: "/usr/lib/x86_64-linux-gnu/libssl.so.1.0.2"
|
||||
dest: "/opt/dell/srvadmin/lib64/libssl.so"
|
||||
path: "/opt/dell/srvadmin/lib64/libssl.so"
|
||||
state: link
|
||||
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 symlinks for OpenManage/racadm apps
|
||||
- name: Ensure some Executables are in PATH
|
||||
ansible.builtin.file:
|
||||
src: "/opt/dell/srvadmin/sbin/{{ item }}"
|
||||
path: "/bin/{{ item }}"
|
||||
state: "link"
|
||||
with_items:
|
||||
- 'omconfig'
|
||||
- 'omexec'
|
||||
- 'omreport'
|
||||
- 'omupdate'
|
||||
- 'racadm'
|
||||
when: (openmanage__deploy_state == "present")
|
||||
|
||||
- name: Remove Executables symlinks
|
||||
ansible.builtin.file:
|
||||
path: "/bin/{{ item }}"
|
||||
state: "absent"
|
||||
with_items:
|
||||
- 'omconfig'
|
||||
- 'omexec'
|
||||
- 'omreport'
|
||||
- 'omupdate'
|
||||
- 'racadm'
|
||||
when: (openmanage__deploy_state == "absent")
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
# {{ 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