Vendor Galaxy Roles and Collections
Some checks failed
/ Ansible Lint (push) Failing after 5m45s
/ Ansible Lint (pull_request) Failing after 4m59s

This commit is contained in:
Stefan Bethke 2026-02-06 22:07:16 +01:00
commit 2aed20393f
3553 changed files with 387444 additions and 2 deletions

View file

@ -0,0 +1,19 @@
debops.hwraid - Manage hardware RAID devices using Ansible
Copyright (C) 2014-2019 Maciej Delmanowski <drybjed@gmail.com>
Copyright (C) 2015-2019 DebOps <https://debops.org/>
SPDX-License-Identifier: GPL-3.0-only
This Ansible role is part of DebOps.
DebOps is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3, as
published by the Free Software Foundation.
DebOps is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with DebOps. If not, see https://www.gnu.org/licenses/.

View file

@ -0,0 +1,116 @@
---
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
# .. Copyright (C) 2014-2019 Maciej Delmanowski <drybjed@gmail.com>
# .. Copyright (C) 2015-2019 DebOps <https://debops.org/>
# .. SPDX-License-Identifier: GPL-3.0-only
# .. _hwraid__ref_defaults:
# debops.hwraid default variables
# ===============================
# .. contents:: Sections
# :local:
#
# .. include:: ../../../../includes/global.rst
# .. envvar:: hwraid_distribution [[[
#
# OS distribution used to lookup available releases
hwraid_distribution: '{{ ansible_distribution }}'
# ]]]
# .. envvar:: hwraid_release [[[
#
# OS release used to lookup available releases
hwraid_release: '{{ ansible_distribution_release }}'
# ]]]
# .. envvar:: hwraid_blacklist [[[
#
# Ignore specified kernel modules
hwraid_blacklist: []
# ]]]
# .. envvar:: hwraid_repository_apt_key_id [[[
#
# HWRaid repository GPG key
hwraid_repository_apt_key_id: '0073 C119 19A6 4146 4163 F711 6005 210E 23B3 D3B4'
# ]]]
# .. envvar:: hwraid_distribution_releases [[[
#
# OS releases available in HWRaid repository
# it is important to have the latest release first
hwraid_distribution_releases:
'Debian': [ 'stretch', 'squeeze', 'sid' ]
'Ubuntu': [ 'wily', 'vivid', 'trusty' ]
# ]]]
# .. envvar:: hwraid_device_database [[[
#
# List of known RAID device drivers and corresponding packages
hwraid_device_database:
# 3Ware Eskalad
# http://hwraid.le-vert.net/wiki/3Ware
- module: '3w_xxxx'
packages: [ 'tw_cli', '3ware-status' ]
daemons: [ '3ware-statusd' ]
- module: '3w_9xxx'
packages: [ 'tw_cli', '3ware-status' ]
daemons: [ '3ware-statusd' ]
# LSI Fusion MPT SAS
# http://hwraid.le-vert.net/wiki/LSIFusionMPT
- module: 'mptsas'
packages: [ 'mpt-status' ]
daemons: [ 'mpt-statusd' ]
# LSI Fusion MPT SAS2
# http://hwraid.le-vert.net/wiki/LSIFusionMPTSAS2
- module: 'mpt2sas'
packages: [ 'sas2ircu', 'sas2ircu-status' ]
daemons: [ 'sas2ircu-statusd' ]
# LSI MegaRAID
# http://hwraid.le-vert.net/wiki/LSIMegaRAID
- module: 'megaraid_mm'
packages: [ 'megactl', 'megaraid-status' ]
daemons: [ 'megaraid-statusd' ]
- module: 'megaraid_mbox'
packages: [ 'megactl', 'megaraid-status' ]
daemons: [ 'megaraid-statusd' ]
# LSI MegaRAID SAS
# http://hwraid.le-vert.net/wiki/LSIMegaRAIDSAS
- module: 'megaraid_sas'
packages: [ 'megactl', 'megaraid-status' ]
daemons: [ 'megaraidsas-statusd' ]
# Adaptec AACRaid
# http://hwraid.le-vert.net/wiki/Adaptec
- module: 'aacraid'
packages: [ 'arcconf', 'aacraid-status' ]
daemons: [ 'aacraid-statusd' ]
# HP/Compaq SmartArray
# http://hwraid.le-vert.net/wiki/SmartArray
- module: 'cciss'
packages: [ 'cciss-vol-status' ]
daemons: [ 'cciss-vol-statusd' ]
# ]]]
# Configuration for other Ansible roles [[[
# -----------------------------------------
# .. envvar:: hwraid__keyring__dependent_apt_keys [[[
#
# Configuration for the :ref:`debops.keyring` Ansible role.
hwraid__keyring__dependent_apt_keys:
- id: '{{ hwraid_repository_apt_key_id }}'
# ]]]

View file

@ -0,0 +1,33 @@
---
# Copyright (C) 2014-2019 Maciej Delmanowski <drybjed@gmail.com>
# Copyright (C) 2015-2022 DebOps <https://debops.org/>
# SPDX-License-Identifier: GPL-3.0-only
# Ensure that custom Ansible plugins and modules included in the main DebOps
# collection are available to roles in other collections.
collections: [ 'debops.debops' ]
dependencies: []
galaxy_info:
author: 'Maciej Delmanowski'
description: 'Configure HWRaid repository and install packages for recognized RAID storage arrays'
company: 'DebOps'
license: 'GPL-3.0-only'
min_ansible_version: '1.7.0'
platforms:
- name: 'Ubuntu'
versions: [ 'all' ]
- name: 'Debian'
versions: [ 'all' ]
galaxy_tags:
- monitoring
- system
- hardware
- raid
- hwraid

View file

@ -0,0 +1,57 @@
---
# Copyright (C) 2014-2019 Maciej Delmanowski <drybjed@gmail.com>
# Copyright (C) 2015-2019 DebOps <https://debops.org/>
# SPDX-License-Identifier: GPL-3.0-only
- name: Select supported release for current distribution
ansible.builtin.set_fact:
hwraid_register_release: '{{ hwraid_release }}'
when: hwraid_release in hwraid_distribution_releases[hwraid_distribution]
# if the current linux distribution is not available yet, we try to use the latest one
- name: Select latest release for current distribution if no match found
ansible.builtin.set_fact:
hwraid_register_release: '{{ hwraid_distribution_releases[hwraid_distribution][0] }}'
when: hwraid_register_release is undefined
- name: Configure HWRaid APT repository
ansible.builtin.apt_repository:
repo: 'deb http://hwraid.le-vert.net/{{ hwraid_distribution | lower }} {{ hwraid_register_release | lower }} main'
state: 'present'
update_cache: True
when: hwraid_register_release is defined and hwraid_register_release
- name: Get list of active kernel modules
ansible.builtin.shell: set -o nounset -o pipefail -o errexit && lsmod | awk '{print $1}'
args:
executable: 'bash'
register: hwraid_register_modules
changed_when: False
- name: Install packages for recognized RAID devices
ansible.builtin.apt:
name: '{{ item.1 }}'
state: 'present'
install_recommends: False
with_subelements:
- '{{ hwraid_device_database }}'
- 'packages'
register: hwraid__register_packages
until: hwraid__register_packages is succeeded
when: ((hwraid_register_release is defined and hwraid_register_release) and
item.0.module not in hwraid_blacklist and
item.0.module in hwraid_register_modules.stdout_lines)
- name: Make sure service starts at boot
ansible.builtin.service:
name: '{{ item.1 }}'
state: 'started'
enabled: yes
with_subelements:
- '{{ hwraid_device_database }}'
- 'daemons'
when: ((hwraid_register_release is defined and hwraid_register_release) and
item.0.module not in hwraid_blacklist and
item.0.module in hwraid_register_modules.stdout_lines)
# vim: syntax=yaml ts=2 sw=2 et sr softtabstop=2 autoindent paste