Spec-Zone.ru › Ansible 2.11

community.general.idrac_redfish_info – Сбор информации о сервере PowerEdge через iDRAC с использованием API Redfish

Примечание

Этот плагин входит в коллекцию community.general (версия 2.0.1).

Для его установки используйте: ansible-galaxy collection install community.general.

Для использования в книге задач укажите: community.general.idrac_redfish_info.

  • Описание
  • Параметры
  • Примеры
  • Возвращаемые значения

Описание

  • Строит URI Redfish локально и отправляет их на удалённые контроллеры iDRAC, чтобы получить информацию.
  • Для использования с операциями Dell EMC iDRAC, требующими расширений Redfish OEM.
  • Этот модуль назывался idrac_redfish_facts до Ansible 2.9, возвращая ansible_facts. Обратите внимание, что модуль community.general.idrac_redfish_info больше не возвращает ansible_facts!

Параметры

Параметр Варианты/Значения по умолчанию Комментарии
baseuri
строка / обязательный
Базовый URI контроллера iDRAC
category
строка / обязательный
Категория для выполнения на контроллере iDRAC
command
список / элементы=строка / обязательный
Список команд для выполнения на контроллере iDRAC
GetManagerAttributes возвращает список словарей, содержащих атрибуты iDRAC, LifecycleController и System
password
строка / обязательный
Пароль для аутентификации с контроллером iDRAC
timeout
целое число
По умолчанию:
10
Время ожидания в секундах для запросов URL к контроллеру OOB
username
строка / обязательный
Имя пользователя для аутентификации с контроллером iDRAC

Примеры

- name: Get Manager attributes with a default of 20 seconds
  community.general.idrac_redfish_info:
    category: Manager
    command: GetManagerAttributes
    baseuri: "{{ baseuri }}"
    username: "{{ username }}"
    password: "{{ password }}"
    timeout: 20
  register: result

# Examples to display the value of all or a single iDRAC attribute
- name: Store iDRAC attributes as a fact variable
  ansible.builtin.set_fact:
    idrac_attributes: "{{ result.redfish_facts.entries | selectattr('Id', 'defined') | selectattr('Id', 'equalto', 'iDRACAttributes') | list | first }}"

- name: Display all iDRAC attributes
  ansible.builtin.debug:
    var: idrac_attributes

- name: Display the value of 'Syslog.1.SysLogEnable' iDRAC attribute
  ansible.builtin.debug:
    var: idrac_attributes['Syslog.1.SysLogEnable']

# Examples to display the value of all or a single LifecycleController attribute
- name: Store LifecycleController attributes as a fact variable
  ansible.builtin.set_fact:
    lc_attributes: "{{ result.redfish_facts.entries | selectattr('Id', 'defined') | selectattr('Id', 'equalto', 'LCAttributes') | list | first }}"

- name: Display LifecycleController attributes
  ansible.builtin.debug:
    var: lc_attributes

- name: Display the value of 'CollectSystemInventoryOnRestart' attribute
  ansible.builtin.debug:
    var: lc_attributes['LCAttributes.1.CollectSystemInventoryOnRestart']

# Examples to display the value of all or a single System attribute
- name: Store System attributes as a fact variable
  ansible.builtin.set_fact:
    system_attributes: "{{ result.redfish_facts.entries | selectattr('Id', 'defined') | selectattr('Id', 'equalto', 'SystemAttributes') | list | first }}"

- name: Display System attributes
  ansible.builtin.debug:
    var: system_attributes

- name: Display the value of 'PSRedPolicy'
  ansible.builtin.debug:
    var: system_attributes['ServerPwr.1.PSRedPolicy']

Возвращаемые значения

Общие возвращаемые значения документированы здесь, следующие поля уникальны для этого модуля:

Ключ Возвращаемое значение Описание
msg
словарь
всегда
различные результаты в зависимости от задачи

Пример:
Список атрибутов менеджера


Авторы

  • Jose Delarosa (@jose-delarosa)

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/community/general/idrac_redfish_info_module.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API