From c80baf7c58092fe12cef343d2c8c220e0e36f86e Mon Sep 17 00:00:00 2001 From: panticz Date: Thu, 21 Mar 2019 16:22:52 +0100 Subject: [PATCH] redfish_facts: Extend CPU data example and output results (#54168) * Extend CPU data example and output results Add "Get CPU Model example" and output result from "Get CPU inventory". Also add example for output of the "Inventory information" to make it easier to use the examples for Ansible beginners. +label: docsite_pr * Remove white space from blank line --- .../remote_management/redfish/redfish_facts.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/ansible/modules/remote_management/redfish/redfish_facts.py b/lib/ansible/modules/remote_management/redfish/redfish_facts.py index 672cb5fb4ec..b40b1194e42 100644 --- a/lib/ansible/modules/remote_management/redfish/redfish_facts.py +++ b/lib/ansible/modules/remote_management/redfish/redfish_facts.py @@ -55,6 +55,18 @@ EXAMPLES = ''' baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" + - debug: + msg: "{{ redfish_facts.cpu.entries | to_nice_json }}" + + - name: Get CPU model + redfish_facts: + category: Systems + command: GetCpuInventory + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + - debug: + msg: "{{ redfish_facts.cpu.entries.0.Model }}" - name: Get fan inventory redfish_facts: @@ -69,6 +81,8 @@ EXAMPLES = ''' baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" + - debug: + msg: "{{ redfish_facts | to_nice_json }}" - name: Get several inventories redfish_facts: