Compare commits
4 Commits
adc6fa1f7b
...
c515e9ceec
Author | SHA1 | Date |
---|---|---|
Jeremy Gardais | c515e9ceec | |
Jeremy Gardais | 134640f473 | |
Jeremy Gardais | 0a00fd393d | |
Jeremy Gardais | 04f7de3fe4 |
14
CHANGELOG.md
14
CHANGELOG.md
|
@ -1,3 +1,17 @@
|
|||
## 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
|
||||
|
|
|
@ -16,10 +16,14 @@ 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__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__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`].
|
||||
|
|
|
@ -14,13 +14,23 @@
|
|||
# apt_repository and apt_key.
|
||||
#
|
||||
openmanage__repositories:
|
||||
# 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_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 ["buster", "bionic"])
|
||||
else "absent" }}'
|
||||
|
@ -29,7 +39,7 @@ openmanage__repositories:
|
|||
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" }}'
|
||||
|
@ -38,7 +48,7 @@ openmanage__repositories:
|
|||
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 == "Debian" and ansible_distribution_major_version is version("8", "<=")) or
|
||||
(ansible_distribution == "Ubuntu" and ansible_distribution_version is version("14.04", "<=")))
|
||||
|
@ -67,12 +77,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 [[[
|
||||
#
|
||||
|
@ -130,6 +140,37 @@ 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 [[[
|
||||
# -----------------------------
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
---
|
||||
# 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'
|
||||
|
|
|
@ -4,6 +4,8 @@ dependencies: []
|
|||
|
||||
galaxy_info:
|
||||
author: "Jérémy Gardais"
|
||||
namespace: ipr-cnrs
|
||||
role_name: openmanage
|
||||
description: "Setup Openmanage"
|
||||
license: WTFPL
|
||||
company: IPR
|
||||
|
@ -12,8 +14,9 @@ galaxy_info:
|
|||
platforms:
|
||||
- name: Debian
|
||||
versions:
|
||||
- stretch
|
||||
- bullseye
|
||||
- buster
|
||||
- stretch
|
||||
galaxy_tags:
|
||||
- system
|
||||
- openmanage
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
## Add repository
|
||||
- name: Add OpenManage repository
|
||||
apt_repository:
|
||||
update_cache: False
|
||||
update_cache: false
|
||||
repo: '{{ item.repo }}'
|
||||
mode: '{{ item.mode | d(omit) }}'
|
||||
filename: '{{ item.filename | d(omit) }}'
|
||||
|
@ -34,11 +34,11 @@
|
|||
## Update cache
|
||||
- name: Update APT cache
|
||||
apt:
|
||||
update_cache: '{{ True
|
||||
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")
|
||||
|
@ -110,6 +110,29 @@
|
|||
- (openmanage__deploy_state == "absent")
|
||||
- "'srvadmin' in ansible_facts.packages"
|
||||
|
||||
# Manage configuration [[[1
|
||||
- name: Create SNMPD custom directory for systemd service
|
||||
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
|
||||
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
|
||||
|
|
|
@ -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