mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-12 00:03:17 +02:00
24 lines
795 B
YAML
24 lines
795 B
YAML
---
|
|
|
|
- set_fact:
|
|
controllers: "{{ controllers | default([]) + [ ansible_devices[item].host ] }}"
|
|
with_items: "{{ ansible_devices.keys() | list }}"
|
|
|
|
- set_fact:
|
|
lsi_controllers: "{{ controllers | select('match', '(?i).*(lsi|megaraid).*') | list | unique }}"
|
|
|
|
- set_fact:
|
|
marvell_nvme_controllers: "{{ controllers | select('match', '(?i).*Marvell.*Non-Volatile memory controller.*') | list | unique }}"
|
|
|
|
- include_tasks: hardware_{{ ansible_os_family }}.yml
|
|
|
|
- name: Remove MegaCli package
|
|
file: path=/tmp/{{ megacli }} state=absent
|
|
when:
|
|
- lsi_controllers | length > 0
|
|
- megacli_installed_version.stdout != megacli_version
|
|
|
|
- name: Copy nmv_cli
|
|
copy: src=mnv_cli dest=/usr/local/bin/mnv_cli owner=root group=root mode=755
|
|
when: marvell_nvme_controllers | length > 0
|