dell / dellemc-openmanage-ansible-modules Goto Github PK
View Code? Open in Web Editor NEWDell OpenManage Ansible Modules
License: GNU General Public License v3.0
Dell OpenManage Ansible Modules
License: GNU General Public License v3.0
System: VxRail E560
iDRAC Firmware:
OS: esxi 6.7
"dellemc_boot_to_network_iso" will return with the error message "Cannot fetch OSD Job status" if you are logged into the iDRAC and the virtual console is started, when the call is executed.
Hello All,
I was just trying to update the dell firmware update using this below playbook
---
- hosts: all
connection: local
name: Update Firmware
gather_facts: False
vars:
ansible_python_interpreter: /usr/bin/python3
tasks:
- name: Update Firmware
dellemc_idrac_firmware:
idrac_ip: "{{ inventory_hostname }}"
idrac_user: "root"
idrac_pwd: "calvin"
share_name: "192.168.50.73:/opt/dell/dellemcrepositorymanager/export"
share_mnt: "/opt/dell/dellemcrepositorymanager/export"
catalog_file_name: "Dell_1.00_Catalog.xml"
reboot: True
job_wait: True
tags :
- installfirmware
inventory file
[all]
192.168.192.126
invoke by running this command
ansible-playbook firm.yml -i host -vvv -t installfirmware
I'm get this below output
root@ansihost:~/Dell-EMC-Ansible-Modules-for-iDRAC# ansible-playbook firm.yml -i host -vvv -t installfirmware
ansible-playbook 2.7.0
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.5/dist-packages/ansible
executable location = /usr/local/bin/ansible-playbook
python version = 3.5.2 (default, Nov 12 2018, 13:43:14) [GCC 5.4.0 20160609]
Using /etc/ansible/ansible.cfg as config file
Parsed /root/Dell-EMC-Ansible-Modules-for-iDRAC/host inventory source with ini plugin
PLAYBOOK: firm.yml *************************************************************************************************************************************************************************************************************************
1 plays in firm.yml
PLAY [Update Firmware Inventory] ***********************************************************************************************************************************************************************************************************
META: ran handlers
TASK [Update Firmware Inventory] ***********************************************************************************************************************************************************************************************************
task path: /root/Dell-EMC-Ansible-Modules-for-iDRAC/firm.yml:10
<192.168.192.126> ESTABLISH LOCAL CONNECTION FOR USER: root
<192.168.192.126> EXEC /bin/sh -c 'echo ~root && sleep 0'
<192.168.192.126> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280 `" && echo ansible-tmp-1559716212.419148-105721185102280="` echo /root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280 `" ) && sleep 0'
Using module file /usr/local/lib/python3.5/dist-packages/ansible/modules/remote_management/dellemc/idrac/dellemc_idrac_firmware.py
<192.168.192.126> PUT /root/.ansible/tmp/ansible-local-41434_afkzn4/tmpzvm4zk9z TO /root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/AnsiballZ_dellemc_idrac_firmware.py
<192.168.192.126> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/ /root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/AnsiballZ_dellemc_idrac_firmware.py && sleep 0'
<192.168.192.126> EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/AnsiballZ_dellemc_idrac_firmware.py && sleep 0'
<192.168.192.126> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/AnsiballZ_dellemc_idrac_firmware.py", line 113, in <module>
_ansiballz_main()
File "/root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/AnsiballZ_dellemc_idrac_firmware.py", line 105, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/AnsiballZ_dellemc_idrac_firmware.py", line 48, in invoke_module
imp.load_module('__main__', mod, module, MOD_DESC)
File "/usr/lib/python3.5/imp.py", line 234, in load_module
return load_source(name, filename, file)
File "/usr/lib/python3.5/imp.py", line 170, in load_source
module = _exec(spec, sys.modules[name])
File "<frozen importlib._bootstrap>", line 626, in _exec
File "<frozen importlib._bootstrap_external>", line 665, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/tmp/ansible_dellemc_idrac_firmware_payload_4ifm_gft/__main__.py", line 212, in <module>
File "/tmp/ansible_dellemc_idrac_firmware_payload_4ifm_gft/__main__.py", line 204, in main
File "/tmp/ansible_dellemc_idrac_firmware_payload_4ifm_gft/__main__.py", line 166, in update_firmware
File "/usr/local/lib/python3.5/dist-packages/omdrivers/lifecycle/iDRAC/iDRACUpdate.py", line 265, in update_from_repo
reboot_needed=reboot_needed, job_wait=job_wait)
File "/usr/local/lib/python3.5/dist-packages/omdrivers/lifecycle/iDRAC/iDRACUpdate.py", line 348, in update_from_repo_usingscp_redfish
self.edit_xml_file(localfile, scpattrval)
File "/usr/local/lib/python3.5/dist-packages/omdrivers/lifecycle/iDRAC/iDRACUpdate.py", line 366, in edit_xml_file
tree = ET.parse(file_location)
File "/usr/lib/python3.5/xml/etree/ElementTree.py", line 1184, in parse
tree.parse(source, parser)
File "/usr/lib/python3.5/xml/etree/ElementTree.py", line 585, in parse
source = open(source, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/opt/dell/dellemcrepositorymanager/export/scp_GX58BT2_20190604_233014.xml'
fatal: [192.168.192.126]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/AnsiballZ_dellemc_idrac_firmware.py\", line 113, in <module>\n _ansiballz_main()\n File \"/root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/AnsiballZ_dellemc_idrac_firmware.py\", line 105, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/AnsiballZ_dellemc_idrac_firmware.py\", line 48, in invoke_module\n imp.load_module('__main__', mod, module, MOD_DESC)\n File \"/usr/lib/python3.5/imp.py\", line 234, in load_module\n return load_source(name, filename, file)\n File \"/usr/lib/python3.5/imp.py\", line 170, in load_source\n module = _exec(spec, sys.modules[name])\n File \"<frozen importlib._bootstrap>\", line 626, in _exec\n File \"<frozen importlib._bootstrap_external>\", line 665, in exec_module\n File \"<frozen importlib._bootstrap>\", line 222, in _call_with_frames_removed\n File \"/tmp/ansible_dellemc_idrac_firmware_payload_4ifm_gft/__main__.py\", line 212, in <module>\n File \"/tmp/ansible_dellemc_idrac_firmware_payload_4ifm_gft/__main__.py\", line 204, in main\n File \"/tmp/ansible_dellemc_idrac_firmware_payload_4ifm_gft/__main__.py\", line 166, in update_firmware\n File \"/usr/local/lib/python3.5/dist-packages/omdrivers/lifecycle/iDRAC/iDRACUpdate.py\", line 265, in update_from_repo\n reboot_needed=reboot_needed, job_wait=job_wait)\n File \"/usr/local/lib/python3.5/dist-packages/omdrivers/lifecycle/iDRAC/iDRACUpdate.py\", line 348, in update_from_repo_usingscp_redfish\n self.edit_xml_file(localfile, scpattrval)\n File \"/usr/local/lib/python3.5/dist-packages/omdrivers/lifecycle/iDRAC/iDRACUpdate.py\", line 366, in edit_xml_file\n tree = ET.parse(file_location)\n File \"/usr/lib/python3.5/xml/etree/ElementTree.py\", line 1184, in parse\n tree.parse(source, parser)\n File \"/usr/lib/python3.5/xml/etree/ElementTree.py\", line 585, in parse\n source = open(source, \"rb\")\nFileNotFoundError: [Errno 2] No such file or directory: '/opt/dell/dellemcrepositorymanager/export/scp_GX58BT2_20190604_233014.xml'\n",
"module_stdout": "msg_id=SYS043\nSeverity=Informational\n",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
to retry, use: --limit @/root/Dell-EMC-Ansible-Modules-for-iDRAC/firm.retry
PLAY RECAP *********************************************************************************************************************************************************************************************************************************
192.168.192.126 : ok=0 changed=0 unreachable=0 failed=1
Can anyone help me with update ?
I am trying to change the SNMP community name using dellemc_configure_idrac_services module and my playbook is as follows
**Play file**
---
- hosts: all
gather_facts: False
become: yes
become_method: sudo
user: root
roles:
- snmp-configure
**snmp-configure role main.yml**
---
- name: setup idrac community name
dellemc_configure_idrac_services:
idrac_ip: "xxx.xxx.xx.xx"
idrac_user: "root"
idrac_pwd: "xxxxx"
share_name: "xxx.xxx.xx.xx/nfsfileshare"
snmp_enable: "Enabled"
community_name: "my_new-name"
become: yes
When I try to run this play , I always get the following error as Command Processing Failed,
"module_stdout": "\rcmdstat\r\n\r\tstatus : 2\r\n\r\tstatus_tag : COMMAND PROCESSING FAILED\r\n\r\terror : 252\r\n\r\terror_tag : COMMAND SYNTAX ERROR\r\n",
"msg": "MODULE FAILURE",
"rc": 0
What could be the actual problem here?
Hi there, I am trying to run the SCP export to an nfs share (hosted actually on the same CentOS7 vm where I am running Ansible from) and it always comes up with an "Exception 'content-type'". I used the examples here to build the playbook, the only difference is the share name: "server.ip://nfs/share/path", which is what works in the eport lc logs task (as opposed to "server.ip:/nfs/share/path"), but it doesn't seem to even hit the nfs server. Any ideas?
thanks in advance!
Alex
Hey all,
I'm seeing an issue with trying to boot my idrac machine from a network boot iso. I've mounted the windows share containing the iso correctly and can access the iso from within via the ansible box. However, when I run the playbook pointing to the share and iso I see the error bellow:
flynn@ncl-ansible-01:~/ansible/playbooks/idrac$ ansible-playbook dell_idrac.yml --tags "network_iso" -i inventory_dell_idrac
PLAY [idrac_servers] *******************************************************************************************************************************************************************************************
TASK [install_esx_custom_image : Install esx esx-6-0u3.iso] ****************************************************************************************************************************************************
fatal: [10.29.50.3]: FAILED! => changed=false
ansible_facts:
discovered_interpreter_python: /usr/bin/python
msg: 'Error: Share path is not valid : ''/home/flynn/ansible/iso/esx_6_0_u3_custom.iso'''
PLAY RECAP *****************************************************************************************************************************************************************************************************
10.29.50.3 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
flynn@ncl-ansible-01:/ansible/playbooks/idrac$ ls /home/flynn/ansible/iso//ansible/playbooks/idrac$
esx_6_0_u3_custom.iso ks.cfg
flynn@ncl-ansible-01:
Am I missing something, or is there an error in the back end?
Rich
Hi,
I am trying to achieve dell login check via ansible but couldn't get it.We have an requirement to check the dell drac console login authentication via automation through ansible.
Can someone help here? I tried simple "uri" module for web authentication doesn't seems to work.
I get this error whenever I try to create a volume:
"msg": "returned status code doesn't match with the expected success code"
What does work is using the Ansible raw module to run racadm commands directly
https://docs.ansible.com/ansible/latest/modules/raw_module.html
So that tells me that it's not likely an issue with my server etc.
If I create a volume manually and use the "view" module it works.
Even tried that, copied the results, deleted the manually created volume and then used the info I got from the "view" mode to try again but it still fails.
My guess is it's failing to select either the controller or the disk/disks correctly.
full error message:
fatal: [127.0.0.1]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"capacity": null,
"controller_id": "RAID.Integrated.1-1",
"disk_cache_policy": "Default",
"idrac_ip": "10.16.85.4",
"idrac_port": 443,
"idrac_pwd": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"idrac_user": "root",
"media_type": null,
"number_dedicated_hot_spare": 0,
"protocol": null,
"raid_init_operation": null,
"raid_reset_config": "False",
"read_cache_policy": "NoReadAhead",
"span_depth": 1,
"span_length": 1,
"state": "create",
"stripe_size": 65536,
"volume_id": null,
"volume_type": "RAID 0",
"volumes": [
{
"drives": {
"id": [
"Disk.Bay.2:Enclosure.Internal.0-1:RAID.Integrated.1-1"
]
},
"name": "test-vol"
}
],
"write_cache_policy": "WriteThrough"
}
},
"msg": "returned status code doesn't match with the expected success code"
}
Hello,
When using dellemc_configure_bios from your example, I have an error.
- name: Configure boot
dellemc_configure_bios:
idrac_ip: "{{ idrac_ip }}"
idrac_user: "xxxxxx"
idrac_pwd: "xxxxxx"
attributes:
BootMode : "Bios"
OneTimeBootMode: "Enabled"
BootSeqRetry: "Enabled"
TASK [Configure boot] ***********************************************************************************
[DEPRECATION WARNING]: boot_mode, nvme_mode, secure_boot_mode, onetime_boot_mode and boot_sequence
options have been deprecated, and will be removed. Please use the attributes option for Bios attributes
configuration instead.{"idrac_user": "xxxxxx", "share_name": null, "idrac_port": 443, "share_mnt": null,
"boot_mode": null, "nvme_mode": null, "share_pwd": null, "onetime_boot_mode": null, "boot_sequence":
null, "boot_sources": null, "attributes": {"BootMode": "Bios", "BootSeqRetry": "Enabled",
"OneTimeBootMode": "Enabled"}, "idrac_pwd": "********", "secure_boot_mode": null, "idrac_ip":
"xxxxxx", "share_user": null}. This feature will be removed in version 2.9. Deprecation warnings
can be disabled by setting deprecation_warnings=False in ansible.cfg.
fatal: [phy-16]: FAILED! => {"changed": false, "msg": {"Message": "Failed to set value for attribute OneTimeBootMode", "Status": "Failed"}}
No error found when using BootMode only.
Thanks !
Hi there, I am trying to update the firmware on some R630's, IDRAC 2.63.60.61 using the latest May release SUU-WIN64_19.05.200.354.ISO and I am getting "The specified repository catalog is not supported."
I tried the Linux SUU ISO too; I found some older posts saying that a 32bit version is needed for this, not sure if this is still the case, but this specific SUU ISO has no 32bit version.
The "repository" directory from the ISO is copied into the /var/nfs/SUU and then shared via nfs.
Here's how I call it:
Hi all,
Just wanted to know if there was any way to push a BIOS update onto a set of hosts using a playbook. I flipped through the guide and example playbooks and was wondering if anyone accomplished such.
Thank you.
I am having issues with 14G servers running dellemc_idrac_firmware.yml from a network repo Catalog.xml - hope anyone can give me some ideas, please.
If trying to update firmware on 14G server, I get failed message: "Export of scp failed for firmware update". it will work on 13G.
If I change the value of idrac.use_redfish in the the dellemc_idrac_firmware.py script from True to False, then 14G will work fine.
What is being utilized when idrac.use_redfish is False ?
What could be stopping this from working when it is set to True ?
Hello,
I'm trying to create two virtual disks with 7 disks, each VD on RAID 6.
The first one with 128Gb and the second with all the remaining disk space.
I can create the first VD without problem but I cannot find a way to create the second VD with left space (like for example: "capacity: -1")
I know this is possible on the GUI by leaving a blank box in "Capacity"
Thanks !
Refactor dellemc_configure_idrac_users
module to use state: [present, absent] instead of action: [create, delete, modify]. Looking at the code you can check for the user and if it doesn't exist create it and if it does modify it.
This is a cleaner and more Ansible-y way to do things based on my experience. Otherwise I had to create two separate blocks one for create and one for modify.
Would you like me to submit a pull request for this?
System: VxRail E560
iDRAC Firmware:
OS: esxi 6.7
Ansible will return with the error message when using 'dellemc_change_power_state': "Error: unhashable type: 'list'" if the iSM Module is running on the host OS (see picture attached)
"Workaround": Shutdown the system before using 'dellemc_change_power_state' so iSM is not running anymore.
Hello,
I'm trying to automate iDRAC deployment. Here is my very simple playbook. copy/paste from User Guide:
dellemc_get_system_inventory_DEBUG.txt
- name: Test iDrac connectivity
hosts: idrac1
gather_facts: false
tasks:
- name: Get HW inventory
dellemc_get_system_inventory:
idrac_ip: "10.42.163.202"
idrac_user: "root"
idrac_pwd: "calvin"
This is the result I get:
PLAY [Test iDrac connectivity] ************************************************************************************************************
TASK [Get HW inventory] *******************************************************************************************************************
[WARNING]: sftp transfer mechanism failed on [10.42.163.202]. Use ANSIBLE_DEBUG=1 to see detailed information
[WARNING]: scp transfer mechanism failed on [10.42.163.202]. Use ANSIBLE_DEBUG=1 to see detailed information
fatal: [10.42.163.202]: FAILED! => {"changed": false, "module_stderr": "Shared connection to 10.42.163.202 closed.\r\n", "module_stdout": "rcmdstat\r\n\r\tstatus : 2\r\n\r\tstatus_tag : COMMAND PROCESSING FAILED\r\n\r\terror : 252\r\n\r\terror_tag : COMMAND SYTAX ERROR\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 0}
to retry, use: --limit @/root/dell_idrac_test.retry
PLAY RECAP ********************************************************************************************************************************
10.42.163.202 : ok=0 changed=0 unreachable=0 failed=1
I used ANSIBLE_DEBUG=1 (full output attached) to check what could be wrong and I noticed the following:
cmdstat1557827893.80669: _low_level_execute_command() done: rc=0, stdout=
status : 2
status_tag : COMMAND PROCESSING FAILED
error : 252
error_tag : COMMAND SYNTAX ERROR
, stderr=
5382 1557827893.81018: _low_level_execute_command(): starting
5382 1557827893.81078: _low_level_execute_command(): executing: /bin/sh -c '/usr/bin/python '"'"' error_tag : COMMAND SYNTAX ERROR/AnsiballZ_dellemc_get_system_inventory.py'"'"' && sleep 0'
About server:
About iDRAC:
Is it me doing something wrong, or is it a bug, or maybe blades for VRTX are not supported ?
Thanks in advance,
Regards,
Hi,
I have trying to run getfirmwareinventory.yml on dell R710 servers it works with some servers and some servers not.
I know this module supports only power generation 12 & above dell R710 falls in power generation 11.
I found the server drac lower on not working server hence upgraded the drac firmware that matches working server but still same issue.
Playbook:
hosts: all
connection: local
name: Get Installed Firmware Inventory
gather_facts: False
tasks:
Error:
fatal: [192.168.17.47]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"idrac": null,
"idrac_ip": "192.168.17.47",
"idrac_port": 443,
"idrac_pwd": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"idrac_user": "test"
}
},
"msg": "Could not find device driver for iDRAC with IP Address: 192.168.17.47"
}
Server Model: Dell R710
Drac Version : 6
Working server drac firmware version: 1.50 (Build 24) Bios: 2.1.9
Not Working drac firmware version : 1.80 (Build 17) Bios: 2.0.13
Not sure why it doesn't work even updating drac firmware version.
Regards
Kumaresan
hi there, I recently upgraded to the latest openmanage ansible modules and ansible 2.8.0. I am trying to configure an R630 and I am getting the error below while running the export. I get the same error if I try to configure the BIOS, so I am thinking the problem is not this specific task. Any insights will be greatly appreciated!
MSG:
MODULE FAILURE
See stdout/stderr for the exact error
MODULE_STDERR:
WARNING: yacc table file version is out of date
Traceback (most recent call last):
File "/home/ansibleuser/.ansible/tmp/ansible-tmp-1559140602.51-269126448783444/AnsiballZ_dellemc_idrac_server_config_profile.py", line 114, in
_ansiballz_main()
File "/home/ansibleuser/.ansible/tmp/ansible-tmp-1559140602.51-269126448783444/AnsiballZ_dellemc_idrac_server_config_profile.py", line 106, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/ansibleuser/.ansible/tmp/ansible-tmp-1559140602.51-269126448783444/AnsiballZ_dellemc_idrac_server_config_profile.py", line 49, in invoke_module
imp.load_module('main', mod, module, MOD_DESC)
File "/tmp/ansible_dellemc_idrac_server_config_profile_payload_eUCJOp/main.py", line 304, in
File "/tmp/ansible_dellemc_idrac_server_config_profile_payload_eUCJOp/main.py", line 289, in main
File "/tmp/ansible_dellemc_idrac_server_config_profile_payload_eUCJOp/ansible_dellemc_idrac_server_config_profile_payload.zip/ansible/module_utils/remote_management/dellemc/dellemc_idrac.py", line 35, in init
KeyError: 'idrac_password'
While trying to collect inventory using Ansible module, getting below error. Not sure what is preventing the LogManager import.
Env:
CentOS7 with Python 2.7.5
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_LbT17e/ansible_module_dellemc_get_system_inventory.py", line 17, in <module>
from ansible.module_utils.dellemc_idrac import *
File "/tmp/ansible_LbT17e/ansible_modlib.zip/ansible/module_utils/dellemc_idrac.py", line 32, in <module>
NameError: name 'LogManager' is not defined
fatal: [idrac1 -> localhost]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_LbT17e/ansible_module_dellemc_get_system_inventory.py\", line 17, in <module>\n from ansible.module_utils.dellemc_idrac import *\n File \"/tmp/ansible_LbT17e/ansible_modlib.zip/ansible/module_utils/dellemc_idrac.py\", line 32, in <module>\nNameError: name 'LogManager' is not defined\n",
"module_stdout": "",
"msg": "MODULE FAILURE",
"rc": 1
}
# python
Python 2.7.5 (default, Apr 9 2015, 11:03:32)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from ansible.module_utils.dellemc_idrac import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/ansible/module_utils/dellemc_idrac.py", line 32, in <module>
LogManager.setup_logging(logger_log_file='/tmp/ansible-omsdk/omsdk_log.log', logger_level=logging.DEBUG)
NameError: name 'LogManager' is not defined
>>>
autonomous-controller-automation โค ansible-playbook -i inventories/r640 r640-idrac-password-change.yml -vvv git:master*
ansible-playbook 2.7.5
config file = /home/mjoseph/my-dev/autonomous-controller-automation/ansible.cfg
configured module search path = [u'/home/mjoseph/my-dev/autonomous-controller-automation/library']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 2.7.15rc1 (default, Nov 12 2018, 14:31:15) [GCC 7.3.0]
Using /home/mjoseph/my-dev/autonomous-controller-automation/ansible.cfg as config file
/home/mjoseph/my-dev/autonomous-controller-automation/inventories/r640/hosts did not meet host_list requirements, check plugin documentation if this is unexpected
/home/mjoseph/my-dev/autonomous-controller-automation/inventories/r640/hosts did not meet script requirements, check plugin documentation if this is unexpected
Parsed /home/mjoseph/my-dev/autonomous-controller-automation/inventories/r640/hosts inventory source with ini plugin
PLAYBOOK: r640-idrac-password-change.yml ********************************************************************************************************************************************************
1 plays in r640-idrac-password-change.yml
PLAY [Change iDRAC default password] ************************************************************************************************************************************************************
META: ran handlers
TASK [r640-server/idrac-password-change : Update iDRAC user password] ***************************************************************************************************************************
task path: /home/mjoseph/my-dev/autonomous-controller-automation/roles/r640-server/idrac-password-change/tasks/main.yaml:5
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: mjoseph
<127.0.0.1> EXEC /bin/sh -c 'echo ~mjoseph && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /home/mjoseph/.ansible/tmp/ansible-tmp-1546950649.02-88032968222999
" && echo ansible-tmp-1546950649.02-88032968222999="echo /home/mjoseph/.ansible/tmp/ansible-tmp-1546950649.02-88032968222999
" ) && sleep 0'
Using module file /home/mjoseph/my-dev/autonomous-controller-automation/library/dellemc_configure_idrac_users.py
<127.0.0.1> PUT /home/mjoseph/.ansible/tmp/ansible-local-10148Syl2UU/tmpm9N380 TO /home/mjoseph/.ansible/tmp/ansible-tmp-1546950649.02-88032968222999/AnsiballZ_dellemc_configure_idrac_users.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/mjoseph/.ansible/tmp/ansible-tmp-1546950649.02-88032968222999/ /home/mjoseph/.ansible/tmp/ansible-tmp-1546950649.02-88032968222999/AnsiballZ_dellemc_configure_idrac_users.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python2 /home/mjoseph/.ansible/tmp/ansible-tmp-1546950649.02-88032968222999/AnsiballZ_dellemc_configure_idrac_users.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/mjoseph/.ansible/tmp/ansible-tmp-1546950649.02-88032968222999/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"action": "modify",
"authenticationprotocol_users": null,
"enable_users": null,
"idrac_ip": "10.234.79.8",
"idrac_port": 443,
"idrac_pwd": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"idrac_user": "root",
"ipmilanprivilege_users": null,
"ipmiserialprivilege_users": null,
"privacyprotocol_users": null,
"privilege_users": null,
"protocolenable_users": null,
"share_mnt": null,
"share_name": "/tmp",
"share_pwd": null,
"share_user": null,
"solenable_users": null,
"user_name": "root",
"user_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"
}
},
"msg": {
"Data": {
"Message": "Failed to get job detail",
"Status": "Failed"
},
"Status": "Failed",
"StatusCode": 401,
"retval": false
}
}
Thank you!
We are currently attempting to use these modules to update our iDrac firmware from ftp.dell.com. To do that we needed to use the fw_update_url branch which is fine, however our problem is that ftp.dell.com has a gzipped Catalog.xml file (specifically, Catalog.xml.gz
).
Is it possible to build this functionality into the module so we can just use this to update from the official Dell updates?
ansible-playbook dellemc_get_system_inventory.yml --Where is the result
Why can't I use hostnames in /etc/ansible/hosts? I have dozens of iDRACs and they all have proper hostnames. How do I use them instead of IP addresses?
With current dev version (1.0.4) I'm getting:
"msg": "'NoneType' object has no attribute 'local_full_path'"
when running the idrac_network role with share_name set to a CIFS path. Samba log reports successful connection
I will like to know how to set up the firmware catalog and firmware directory properly, so that I can use the dellemc_install_firmware module to import firmware,
I received following error,
"msg": "Error: 'NoneType' object has no attribute 'name'"
My environment,
$ ansible-playbook --version
ansible-playbook 2.5.0
config file = /home/VChong1/.ansible.cfg
configured module search path = [u'/usr/lib/python2.7/site-packages/ansible/modules/remote_management/redfish;/usr/lib/python2.7/site-packages/ansible/modules;/usr/lib/python2.7/site-packages/ansible/modules/network/a10;/usr/lib/python2.7/site-packages/ansible/modules/network/f5;/usr/lib/python2.7/site-packages/ansible;/home/vchong/projects/library;/usr/share/my_modules;/usr/lib/python2.7/site-packages/ansible/modules/extras/dellemc/server']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 2.7.14 (default, Oct 31 2017, 21:12:13) [GCC 6.4.0]
Executing the play below,
$ ansible-playbook -i hosts_dell dell_import_firmware.yml -u root -k -vvvv
ansible-playbook 2.5.0
config file = /home/VChong1/.ansible.cfg
configured module search path = [u'/usr/lib/python2.7/site-packages/ansible/modules/remote_management/redfish;/usr/lib/python2.7/site-packages/ansible/modules;/usr/lib/python2.7/site-packages/ansible/modules/network/a10;/usr/lib/python2.7/site-packages/ansible/modules/network/f5;/usr/lib/python2.7/site-packages/ansible;/home/vchong/projects/library;/usr/share/my_modules;/usr/lib/python2.7/site-packages/ansible/modules/extras/dellemc/server']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 2.7.14 (default, Oct 31 2017, 21:12:13) [GCC 6.4.0]
Using /home/VChong1/.ansible.cfg as config file
SSH password:
setting up inventory plugins
Parsed /home/VChong1/Ansible/DELL/hosts_dell inventory source with ini plugin
Loading callback plugin skippy of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/skippy.pyc
PLAYBOOK: dell_import_firmware.yml *********************************************************************************************************************************************************************************************
1 plays in dell_import_firmware.yml
PLAY [dell] ********************************************************************************************************************************************************************************************************************
TASK [Gathering Facts] *********************************************************************************************************************************************************************************************************
task path: /home/VChong1/Ansible/DELL/dell_import_firmware.yml:9
Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/setup.py
<10.145.141.116> ESTABLISH LOCAL CONNECTION FOR USER: VChong1
<10.145.141.116> EXEC /bin/sh -c 'echo ~ && sleep 0'
<10.145.141.116> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/VChong1/.ansible/tmp/ansible-tmp-1537808617.72-139810963631391 `" && echo ansible-tmp-1537808617.72-139810963631391="` echo /home/VChong1/.ansible/tmp/ansible-tmp-1537808617.72-139810963631391 `" ) && sleep 0'
<10.145.141.116> PUT /home/VChong1/.ansible/tmp/ansible-local-164d57Kdm/tmpE_Jj8k TO /home/VChong1/.ansible/tmp/ansible-tmp-1537808617.72-139810963631391/setup.py
<10.145.141.116> EXEC /bin/sh -c 'chmod u+x /home/VChong1/.ansible/tmp/ansible-tmp-1537808617.72-139810963631391/ /home/VChong1/.ansible/tmp/ansible-tmp-1537808617.72-139810963631391/setup.py && sleep 0'
<10.145.141.116> EXEC /bin/sh -c '/usr/bin/python /home/VChong1/.ansible/tmp/ansible-tmp-1537808617.72-139810963631391/setup.py && sleep 0'
<10.145.141.116> EXEC /bin/sh -c 'rm -f -r /home/VChong1/.ansible/tmp/ansible-tmp-1537808617.72-139810963631391/ > /dev/null 2>&1 && sleep 0'
ok: [o2cblv13]
META: ran handlers
TASK [dell_import_firmware : Get Installed Firmware Inventory] *****************************************************************************************************************************************************************
task path: /home/VChong1/Ansible/DELL/roles/dell_import_firmware/tasks/main.yml:9
Using module file /usr/lib/python2.7/site-packages/ansible/modules/extras/dellemc/server/dellemc_install_firmware.py
<10.145.141.116> ESTABLISH LOCAL CONNECTION FOR USER: VChong1
<10.145.141.116> EXEC /bin/sh -c 'echo ~ && sleep 0'
<10.145.141.116> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/VChong1/.ansible/tmp/ansible-tmp-1537808622.25-318046750616 `" && echo ansible-tmp-1537808622.25-318046750616="` echo /home/VChong1/.ansible/tmp/ansible-tmp-1537808622.25-318046750616 `" ) && sleep 0'
<10.145.141.116> PUT /home/VChong1/.ansible/tmp/ansible-local-164d57Kdm/tmpLUrO8H TO /home/VChong1/.ansible/tmp/ansible-tmp-1537808622.25-318046750616/dellemc_install_firmware.py
<10.145.141.116> EXEC /bin/sh -c 'chmod u+x /home/VChong1/.ansible/tmp/ansible-tmp-1537808622.25-318046750616/ /home/VChong1/.ansible/tmp/ansible-tmp-1537808622.25-318046750616/dellemc_install_firmware.py && sleep 0'
<10.145.141.116> EXEC /bin/sh -c '/usr/bin/python /home/VChong1/.ansible/tmp/ansible-tmp-1537808622.25-318046750616/dellemc_install_firmware.py && sleep 0'
<10.145.141.116> EXEC /bin/sh -c 'rm -f -r /home/VChong1/.ansible/tmp/ansible-tmp-1537808622.25-318046750616/ > /dev/null 2>&1 && sleep 0'
fatal: [o2cblv13]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"idrac": null,
"idrac_ip": "10.145.141.116",
"idrac_port": 443,
"idrac_pwd": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"idrac_user": "root",
"job_wait": true,
"reboot": false,
"share_mnt": "files********",
"share_name": "files********TMUS_Magenta_2018Q3_v5_1.00_Catalog.xml",
"share_pwd": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"share_user": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"
}
},
"msg": "Error: 'NoneType' object has no attribute 'name'"
}
to retry, use: --limit @/home/VChong1/Ansible/DELL/dell_import_firmware.retry
PLAY RECAP *********************************************************************************************************************************************************************************************************************
o2cblv13 : ok=1 changed=0 unreachable=0 failed=1
My roles, playbook and firmware catalog information,
VChong1@wabelhlp0691565 ~/Ansible/DELL
$ pwd
/home/VChong1/Ansible/DELL
VChong1@wabelhlp0691565 ~/Ansible/DELL
$ cat dell_import_firmware.yml
---
# author: Vincent Chong
# email: [email protected]
# version 1.0
# Usage: get dell server firmeware
# ansible-playbook -i hosts dell_get_firmware.yml
#
#
- hosts: dell
roles:
- dell_import_firmware
...
VChong1@wabelhlp0691565 ~/Ansible/DELL
$ cat roles/dell_import_firmware/tasks/main.yml
---
# author: Vincent Chong
# email: [email protected]
# version 1.0
# Usage: import dell server firmware
# ansible-playbook -i hosts dell_import_firmware.yml
#
#
- name: Get Installed Firmware Inventory
dellemc_install_firmware:
idrac_ip: "{{ ansible_host }}"
idrac_user: "{{ idrac_user }}"
idrac_pwd: "{{ idrac_pwd }}"
share_name: "files/TMUS_Magenta_2018Q3_v5_1.00_Catalog.xml"
share_user: "/"
share_pwd: "/"
share_mnt: "files/"
# Dell Repository Manager Information
# share_name: "10.94.222.51"
# share_user: "adm_vchong1"
# share_pwd: "{{ share_pwd }}"
# share_mnt: "/firmware"
reboot: False
job_wait: True
...
VChong1@wabelhlp0691565 ~/Ansible/DELL
$ tree roles/dell_import_firmware/.
roles/dell_import_firmware/.
โโโ defaults
โ โโโ main.yml
โโโ files
โ โโโ FOLDER03699392M
โ โ โโโ 1
โ โ โโโ SAS-Drive_Firmware_R52VG_WN64_NSF1_A00.EXE
<omitted>
โ โโโ TMUS_Magenta_2018Q3_v5_1.00_Catalog.xml
โโโ handlers
โ โโโ main.yml
โโโ meta
โ โโโ main.yml
โโโ README.md
โโโ tasks
โ โโโ main.yml
โโโ templates
โโโ tests
โ โโโ inventory
โ โโโ test.yml
โโโ vars
โโโ main.yml
248 directories, 129 files
Hey all,
I'm trying to build some Ansible playbooks to configure iDrac moving forward and I can't seem to get the dellemc_get_system_inventory to work. It keeps failing with the following:
_An exception occurred during task execution. To see the full traceback, use -vvv. The error was: KeyError: 'idrac_password'
fatal: [test_server]: FAILED! => changed=false
ansible_facts:
discovered_interpreter_python: /usr/bin/python
module_stderr: |-
Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-tmp-1558458853.37-38202877671688/AnsiballZ_dellemc_get_system_inventory.py", line 114, in
_ansiballz_main()
File "/root/.ansible/tmp/ansible-tmp-1558458853.37-38202877671688/AnsiballZ_dellemc_get_system_inventory.py", line 106, in ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/root/.ansible/tmp/ansible-tmp-1558458853.37-38202877671688/AnsiballZ_dellemc_get_system_inventory.py", line 49, in invoke_module
imp.load_module('main', mod, module, MOD_DESC)
File "/tmp/ansible_dellemc_get_system_inventory_payload_bmfmxr/main.py", line 115, in
File "/tmp/ansible_dellemc_get_system_inventory_payload_bmfmxr/main.py", line 104, in main
File "/tmp/ansible_dellemc_get_system_inventory_payload_bmfmxr/ansible_dellemc_get_system_inventory_payload.zip/ansible/module_utils/remote_management/dellemc/dellemc_idrac.py", line 35, in init
KeyError: 'idrac_password'
module_stdout: ''
msg: |-
MODULE FAILURE
See stdout/stderr for the exact error
rc: 1
In case you need it my BIOS and iDrac version are:
BIOS Version | 1.6.13 |
---|---|
iDRAC Firmware Version | 3.30.30.30 |
ansible --version = ansible 2.8.0
I'm not sure why it's failing here - KeyError: 'idrac_password'. I know the password is correct as I can CURL to the box from this host.
Rich
I see in the recent Dell EMC ansible module we not see the module for nabling the rsyslog and configuring the rsyslog server and port configuration . Please appreciate help on this,
Hi,
I am trying to update firmware via ansible using dell-emc-ansible-module but it fails with below error.Can someone help me out?
Playbook:
hosts: all
connection: local
name: Update Firmware Inventory
gather_facts: False
tasks:
Output:
fatal: [192.168.17.47]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"idrac": null,
"idrac_ip": " 192.168.17.47",
"idrac_port": 443,
"idrac_pwd": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"idrac_user": "test",
"job_wait": true,
"reboot": false,
"share_mnt": "/mnt",
"share_name": "192.168.17.18:/racadm/firmware/",
"share_pwd": "{'required': False}",
"share_user": "{'required': False}"
}
},
"msg": "Error: 'NoneType' object has no attribute 'use_redfish'"
}
Contents of firmware directory:
[root@test]# ls -lrt
total 83
-rw-r--r-- 1 root root 60937340 Nov 17 13:23 ESM_Firmware_MXKG2_LN32_2.91_A00.BIN
-rw-r--r-- 1 root root 10852356 Nov 17 13:23 BIOS_0F4YY_LN_6.6.0.BIN
-rw-r--r-- 1 root root 13612935 Nov 17 13:23 Lifecycle-Controller_Legacy_Application_0WFGM_LN_1.7.5.4_A00.BIN
[root@test]
Also is there way to integrate this module with openmanage? We have openamnager installed which we use for firmware update.
Regards
Kumaresan
Is there a possibility to enable or disable IDRAC-VNC via Ansible?
(1) I ran a playbook with โjob_wait: Falseโ using Local file streaming and it does not return me the JOB ID and file name (see below):
ok: [idrac-HTZ1GL2 -> localhost] => {
"changed": false,
"invocation": {
"module_args": {
"export_format": "XML",
"export_use": "Clone",
"idrac": null,
"idrac_ip": "100.100.34.249",
"idrac_port": 443,
"idrac_pwd": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"idrac_user": "ansible",
"job_wait": false,
"scp_components": "ALL",
"share_name": "/home/anupam/workspace/ansible-py3/playbooks",
"share_pwd": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"share_user": "AJUDOM\\Administrator"
}
},
"msg": {
"Message": "Exported content written to local file",
"Status": "Success"
}
}
(2) When digging deeper into the omsdk, I find that job_wait
module argument is not at all used in scp_export_to_local_share_redfish
method. Copy pasting from the iDRACConfig.py :
4414 if self.entity.use_redfish and isinstance(share, LocalFile):
4415 return self.scp_export_to_local_share_redfish(share.local_full_path, target=target,
4416 export_format=export_format,
4417 export_use=export_use,
4418 include_in_export=include_in_export)
Hi there,
I'm just curious as to why this isn't bundled as an Ansible Role? Is there something different that's needed that couldn't be provided in the form of a role?
Thanks!
Hello,
im receiving the following error when running my playbooks
setting up inventory plugins
Parsed /home/feisa/git/network/hosts inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/default.pyc
PLAYBOOK: idrac_ntp_setup.yaml **************************************************************************************************************************************************************************************
1 plays in playbooks/idrac_ntp_setup.yaml
PLAY [idrac ntp configuration] **************************************************************************************************************************************************************************************
META: ran handlers
TASK [setting anycast ntp] ******************************************************************************************************************************************************************************************
task path: /home/feisa/git/network/playbooks/idrac_ntp_setup.yaml:7
<10.9.245.120> ESTABLISH LOCAL CONNECTION FOR USER: root
<10.9.245.120> EXEC /bin/sh -c 'echo ~root && sleep 0'
<10.9.245.120> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /root/.ansible/tmp/ansible-tmp-1532359842.63-3625996183745
" && echo ansible-tmp-1532359842.63-3625996183745="echo /root/.ansible/tmp/ansible-tmp-1532359842.63-3625996183745
" ) && sleep 0'
Using module file /usr/lib/python2.7/site-packages/ansible/modules/extras/dellemc/server/dellemc_configure_idrac_timezone.py
<10.9.245.120> PUT /root/.ansible/tmp/ansible-local-3217_eJwcQ/tmp_PCXNL TO /root/.ansible/tmp/ansible-tmp-1532359842.63-3625996183745/dellemc_configure_idrac_timezone.py
<10.9.245.120> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1532359842.63-3625996183745/ /root/.ansible/tmp/ansible-tmp-1532359842.63-3625996183745/dellemc_configure_idrac_timezone.py && sleep 0'
<10.9.245.120> EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1532359842.63-3625996183745/dellemc_configure_idrac_timezone.py && sleep 0'
<10.9.245.120> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1532359842.63-3625996183745/ > /dev/null 2>&1 && sleep 0'
fatal: [10.9.245.120]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"enable_ntp": "Enabled",
"idrac": null,
"idrac_ip": "10.9.245.120",
"idrac_port": 443,
"idrac_pwd": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"idrac_user": "root",
"ntp_server_1": "10.255.255.2",
"ntp_server_2": null,
"ntp_server_3": null,
"setup_idrac_timezone": "UTC",
"share_mnt": "/mnt/tmp",
"share_name": "/mnt/tmp",
"share_pwd": null,
"share_user": null
}
},
"msg": "'NoneType' object has no attribute 'local_full_path'"
}
PLAY RECAP **********************************************************************************************************************************************************************************************************
10.9.245.120 : ok=0 changed=0 unreachable=0 failed=1
Hi there, I am importing the RAID config on a server with 2 controllers (the AHCI SD mirrored controller and a PERC, it's an R640) and the standard controller always gets the 2 virtual disks setup, global hotspare, everything is good but the SD cards never get mirrored into a virtual disk, no errors reported. Is this a limitation of the module or am I missing something?
thanks!
Alex
Hello,
I'm trying to access VRTX CMC using simple playbook:
---
- name: Test CMC connectivity
hosts: cmc
connection: local
gather_facts: false
tasks:
- name: Get HW inventory
dellemc_get_system_inventory:
idrac_ip: "10.42.163.201"
idrac_user: "service"
idrac_pwd: "calvin"
However I get following error:
TASK [Get HW inventory] ***********************************************************************************************
fatal: [10.42.163.201]: FAILED! => {"changed": false, "msg": "Could not find device driver for iDRAC with IP Address: 10.42.163.201"}
Public key has been uploaded to CMC and it works.
So the question is, is VRTX CMC supported by your Ansible modules ?
Regards,
Hi there, I have a complex-ish playbook that configures R630 servers for ESXi w/VSAN, and I keep running into issues (the IDRAC AND LC are updated to 2.63.60.61 via ssh in a different task) when I try to setup one-time boot to UEFI PXE. If I load and SCP with the "OneTimeUefiBootSeq" set to "NIC.PxeDevice.1-1" it gets stuck in this condition, and every restart PXE boots, even when "UefiBootSeq" is set to"Disk.SDInternal.1-1".
I changed the workflow a bit and I now load an SCP with "UefiBootSeq" set to PXE, with a shutdown_type: "Forced", and then I load just a short SCP setting the "UefiBootSeq" to"Disk.SDInternal.1-1", with a shutdown_type: "NoReboot", so when the ESXi installer reboots it applies.
The results of this are inconsistent though, it happens a lot that the Import job gets stuck at 90%, even after multiple reboots, so the second task never applies and the server reinstalls ESXi.
I am now adding logic to detect this condition, but is this a known issue? Did anyone else experience this?
thanks!
Alex
Team,
I am trying to automate firmware upgrade with dell ansible module found below playbook not workings as expected.Can someone help to troubleshoot?
Playbook:
tasks:
Results:
PLAY [all] *************************************************************************************************************************************************************
TASK [Gathering Facts] *************************************************************************************************************************************************
ok: [192.168.2.14]
TASK [Update Firmware Inventory] ***************************************************************************************************************************************
fatal: [192.168.2.14]: FAILED! => {"changed": false, "msg": "Could not find device driver for iDRAC with IP Address: 192.168.2.14"}
to retry, use: --limit @/Test/Dell-EMC-Ansible-Modules-for-iDRAC-master/examples/installfirmware.retry
PLAY RECAP *************************************************************************************************************************************************************
192.168.2.14 : ok=1 changed=0 unreachable=0 failed=1
When running playbook with -vvvvv shows me below output
The full traceback is:
File "/tmp/ansible_ODjapd/ansible_module_dellemc_idrac_firmware.py", line 203, in main
with iDRACConnection(module.params) as idrac:
File "/tmp/ansible_ODjapd/ansible_modlib.zip/ansible/module_utils/remote_management/dellemc/dellemc_idrac.py", line 52, in enter
raise RuntimeError(msg)
fatal: [192.168.2.14]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"catalog_file_name": "Dell_710_730_1.00_Catalog.xml",
"idrac_ip": " 192.168.2.14",
"idrac_port": 443,
"idrac_pwd": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"idrac_user": "root",
"job_wait": true,
"reboot": false,
"share_mnt": "/mnt",
"share_name": "192.168.2.15:/opt/dell/dellemcrepositorymanager/export",
"share_pwd": "{'required': False}",
"share_user": "{'required': False}"
}
},
"msg": "Could not find device driver for iDRAC with IP Address: 192.168.2.14"
}
to retry, use: --limit @/Test/Public/Dell-EMC-Ansible-Modules-for-iDRAC-master/examples/installfirmware.retry
PLAY RECAP *************************************************************************************************************************************************************
192.168.2.14 : ok=1 changed=0 unreachable=0 failed=1
Ansible version : 2.4.2.0
Python version : 2.7.5
dellemc-openmanage-ansible-modules-devel : 1.2
Server Model : R730
Idrac Firm : 2.52.52.52
Regards
Kumar
Model: PowerEdge R640
iDRAC Firmware Version: 3.32.32.32
I'm trying to set my ISO as a boot CD and I'm receiving this weird message error. As you can see, the IP address is correct.
Playbook:
---
- name: Set image as a boot CD
dellemc_boot_to_network_iso:
idrac_ip: "{{ idrac_ip }}"
idrac_user: "{{ idrac_user }}"
idrac_pwd: "{{ idrac_password }}"
share_name: "{{ nfs_image_path }}"
iso_image: "{{ dest_iso_image }}"
...
Output:
TASK [Set the previously generated image as a boot CD] *************************
fatal: [xxxxxxxxxx]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"idrac_ip": "172.17.25.140",
"idrac_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"idrac_port": 443,
"idrac_pwd": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"idrac_user": "root",
"iso_image": "debian-netinst.iso",
"share_name": "nfs-machine:/data/nfs-share",
"share_password": null,
"share_user": null
}
},
"msg": {
"DeleteOnCompletion": "false",
"InstanceID": "DCIM_OSDConcreteJob:1",
"JobName": "BootToNetworkISO",
"JobStatus": "Failed",
"Key": "<null_index>",
"Message": "IP Address format is invalid.",
"MessageID": "OSD61",
"Name": "BootToNetworkISO",
"Status": "Failed",
"file": "nfs-machine:/data/nfs-share/debian-netinst.iso",
"retval": false
}
}
The Lifecycle Log reports this action without any error message:
Message ID: USR107
Log Sequence Number: 574
Detailed Description: The identified user has performed the identified set operation or invoke method operation. The operation is either set on an instance of the class identified or an invocation of the identified method.
Recommended Action: No response action is required.
Otherwise, following playbook with the same IP and credentials doesn't fail:
dellemc_get_system_inventory:
idrac_ip: "{{ idrac_ip }}"
idrac_user: "{{ idrac_user }}"
idrac_pwd: "{{ idrac_password }}"
register: system_inventory
I have two issues,
The value of PxeDev1VlanId apparently needs to be quoted, otherwise I get the error message Failed to set values. The example form the manual show an unquoted example.
The above was just a little inconveniece.
When I set the PxeDev1VlanId with the quoted value, the caused a reboot which I didn't expect.
Hi! I am trying to use IDRAC Ansible Modules, but a simple dellemc_get_firmware_inventory from the samples directory fails with above error. I am using Python 2.7.5 with ansible 2.4.2.0 an RHEL 7.6
$ ansible-playbook -vvv -i inventory.yml get_firmware_storm5.yml
ansible-playbook 2.4.2.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/dfroehli/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 2.7.5 (default, Sep 12 2018, 05:31:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
Using /etc/ansible/ansible.cfg as config file
Parsed /home/dfroehli/git/Dell-EMC-Ansible-Modules-for-iDRAC/inventory.yml inventory source with yaml plugin
PLAYBOOK: get_firmware_storm5.yml ****************************************************************************************************************************************************************
1 plays in get_firmware_storm5.yml
PLAY [Get Installed Firmware Inventory] **********************************************************************************************************************************************************
META: ran handlers
TASK [Get Installed Firmware Inventory] **********************************************************************************************************************************************************
task path: /home/dfroehli/git/Dell-EMC-Ansible-Modules-for-iDRAC/get_firmware_storm5.yml:8
Using module file /home/dfroehli/git/Dell-EMC-Ansible-Modules-for-iDRAC/library/dellemc_get_firmware_inventory.py
<10.32.104.71> ESTABLISH LOCAL CONNECTION FOR USER: dfroehli
<10.32.104.71> EXEC /bin/sh -c 'echo ~ && sleep 0'
<10.32.104.71> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /home/dfroehli/.ansible/tmp/ansible-tmp-1544098663.02-109993120111698
" && echo ansible-tmp-1544098663.02-109993120111698="echo /home/dfroehli/.ansible/tmp/ansible-tmp-1544098663.02-109993120111698
" ) && sleep 0'
<10.32.104.71> PUT /tmp/tmpFGkknE TO /home/dfroehli/.ansible/tmp/ansible-tmp-1544098663.02-109993120111698/dellemc_get_firmware_inventory.py
<10.32.104.71> EXEC /bin/sh -c 'chmod u+x /home/dfroehli/.ansible/tmp/ansible-tmp-1544098663.02-109993120111698/ /home/dfroehli/.ansible/tmp/ansible-tmp-1544098663.02-109993120111698/dellemc_get_firmware_inventory.py && sleep 0'
<10.32.104.71> EXEC /bin/sh -c '/usr/bin/python /home/dfroehli/.ansible/tmp/ansible-tmp-1544098663.02-109993120111698/dellemc_get_firmware_inventory.py; rm -rf "/home/dfroehli/.ansible/tmp/ansible-tmp-1544098663.02-109993120111698/" > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_gEqX4a/ansible_module_dellemc_get_firmware_inventory.py", line 68, in
from ansible.module_utils.dellemc_idrac import iDRACConnection
File "/tmp/ansible_gEqX4a/ansible_modlib.zip/ansible/module_utils/dellemc_idrac.py", line 21, in
File "/usr/lib/python2.7/site-packages/omsdk-1.2.345-py2.7.egg/omsdk/sdkcreds.py", line 27, in
from omsdk.sdkprint import PrettyPrint
File "/usr/lib/python2.7/site-packages/omsdk-1.2.345-py2.7.egg/omsdk/sdkprint.py", line 44, in
from pysnmp.hlapi import *
File "/usr/lib/python2.7/site-packages/pysnmp/hlapi/init.py", line 7, in
from pysnmp.proto.rfc1902 import *
File "/usr/lib/python2.7/site-packages/pysnmp/proto/rfc1902.py", line 9, in
from pysnmp.proto import rfc1155, error
File "/usr/lib/python2.7/site-packages/pysnmp/proto/rfc1155.py", line 50, in
class NetworkAddress(univ.Choice):
File "/usr/lib/python2.7/site-packages/pysnmp/proto/rfc1155.py", line 55, in NetworkAddress
def clone(self, value=univ.noValue, **kwargs):
AttributeError: 'module' object has no attribute 'noValue'
fatal: [10.32.104.71]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File "/tmp/ansible_gEqX4a/ansible_module_dellemc_get_firmware_inventory.py", line 68, in \n from ansible.module_utils.dellemc_idrac import iDRACConnection\n File "/tmp/ansible_gEqX4a/ansible_modlib.zip/ansible/module_utils/dellemc_idrac.py", line 21, in \n File "/usr/lib/python2.7/site-packages/omsdk-1.2.345-py2.7.egg/omsdk/sdkcreds.py", line 27, in \n from omsdk.sdkprint import PrettyPrint\n File "/usr/lib/python2.7/site-packages/omsdk-1.2.345-py2.7.egg/omsdk/sdkprint.py", line 44, in \n from pysnmp.hlapi import *\n File "/usr/lib/python2.7/site-packages/pysnmp/hlapi/init.py", line 7, in \n from pysnmp.proto.rfc1902 import *\n File "/usr/lib/python2.7/site-packages/pysnmp/proto/rfc1902.py", line 9, in \n from pysnmp.proto import rfc1155, error\n File "/usr/lib/python2.7/site-packages/pysnmp/proto/rfc1155.py", line 50, in \n class NetworkAddress(univ.Choice):\n File "/usr/lib/python2.7/site-packages/pysnmp/proto/rfc1155.py", line 55, in NetworkAddress\n def clone(self, value=univ.noValue, **kwargs):\nAttributeError: 'module' object has no attribute 'noValue'\n",
"module_stdout": "",
"msg": "MODULE FAILURE",
"rc": 0
}
Any idea? Thx Dan
I'm getting the following error with iDRAC 2.60.60.60 and the latest devel (1.0.4) version of dellemc_configure_idrac_network module.
I believe this used to work with 1.0.3, although that version seems to have other bugs for which I'll open a separate ticket if they persist in 1.0.4.
On line 321 of library/dellemc_configure_bios.py you are setting reboot=True. We should probably be making this a parameter. I checked the beta branch and didn't see the dellemc_configure_bios module. What is the plan for this module? Did it move to something else?
Did a quick search and this module needs updated as well library/dellemc_idrac_lc_attributes.py
I can submit a pull request for these if you'd like? Submit to beta branch?
hosts: all
connection: local
name: Configure the iDRAC users attributes
gather_facts: False
tasks:
TASK [Configure the create iDRAC users attributes] ***************************************************************************************************************************************************
fatal: [127.0.0.1]: FAILED! => {"changed": false, "msg": "returned status code doesn't match with the expected success code"}
fatal: [10.23.156.24]: FAILED! => {"changed": false, "msg": "[Errno 2] No such file or directory: '/mnt/share/scpoviiyr.xml1'"}
When trying to create a new volume group on a Dell PowerEdge R640 with PERC H740P Mini, the creation process fails with the following:
PLAY [Create the RAID] *********************************************************
TASK [Create the RAID] *********************************************************
fatal: [node01]: FAILED! => {"changed": false, "msg": "Error: Invalid attribute FreeSize"}
To reproduce: simply try to create a raid 0 array with a single disk as a test, it will fail with the message above.
Hello All,
I'm first using this dellemc-openmanage-ansible-modules .
I have configured my virtual environment in pycharm as dell-scripts. Installed ansible 2.8, pip and installed omsdk by following this below article
https://github.com/dell/omsdk
Then installed dell open managed ansible module
https://github.com/dell/dellemc-openmanage-ansible-modules
(dell-scripts) victorCS:dell-scripts vchevakula$ ansible --version ansible 2.8.0 config file = None configured module search path = [u'/Users/vchevakula/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /Users/vchevakula/.virtualenvs/dell-scripts/lib/python2.7/site-packages/ansible executable location = /Users/vchevakula/.virtualenvs/dell-scripts/bin/ansible python version = 2.7.10 (default, Oct 6 2017, 22:29:07) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] (dell-scripts) victorCS:dell-scripts vchevakula$
According documentation I have configured inventory file as below
[all] 192.168.10.10 host='192.168.10.10' user='root' pwd='calvin'
playbook
`---
hosts: all
gather_facts: False
vars:
ansible_python_interpreter: ~/.virtualenvs/dell-scripts/bin/python2.7
tasks:
I'm getting the output as below
`(dell-scripts) victorCS:dell-scripts vchevakula$ ~/.virtualenvs/dell-scripts/bin/ansible-playbook playbook.yml -i inventory -vvv
ansible-playbook 2.8.0
config file = None
configured module search path = [u'/Users/vchevakula/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /Users/vchevakula/.virtualenvs/dell-scripts/lib/python2.7/site-packages/ansible
executable location = /Users/vchevakula/.virtualenvs/dell-scripts/bin/ansible-playbook
python version = 2.7.10 (default, Oct 6 2017, 22:29:07) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]
No config file found; using defaults
host_list declined parsing /Users/vchevakula/PycharmProjects/dell-scripts/inventory as it did not pass it's verify_file() method
script declined parsing /Users/vchevakula/PycharmProjects/dell-scripts/inventory as it did not pass it's verify_file() method
auto declined parsing /Users/vchevakula/PycharmProjects/dell-scripts/inventory as it did not pass it's verify_file() method
Parsed /Users/vchevakula/PycharmProjects/dell-scripts/inventory inventory source with ini plugin
PLAYBOOK: playbook.yml ********************************************************************************************************************
1 plays in playbook.yml
PLAY [all] ********************************************************************************************************************************
META: ran handlers
TASK [Get hardware inventory] *************************************************************************************************************
task path: /Users/vchevakula/PycharmProjects/dell-scripts/playbook.yml:8
<192.168.10.10> ESTABLISH SSH CONNECTION FOR USER: None
<192.168.10.10> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/Users/vchevakula/.ansible/cp/e418d7e50a 192.168.192.126 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<192.168.10.10> (255, '', '[email protected]: Permission denied (publickey,password).\r\n')
fatal: [192.168.192.126]: UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: [email protected]: Permission denied (publickey,password).",
"unreachable": true
}
PLAY RECAP ********************************************************************************************************************************
192.168.10.10 : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0
`
I have prepared those files as shown in the documentations.
Can anyone guide if I'm making any mistake
Hello Team,
I'm testing the module dellemc_export_server_config_profile.yml and works fine with XML export for NFS shared directory. But export task as JSON is failing as below
"msg": {
"Message": "Unable to export scp, exception occurred",
"Status": "Failed",
"file": "/home/praveen/NFSSHARE/X.X.X.X_20181114_050601_scp.json"
}
I used devel branch for both Dell-EMC-Ansible-Modules-for-iDRAC and omsdk(sh build.sh 1.2 345)
pip version is 8.1.2, python 2.7.5, Ansible 2.4.20
Servers used: PowerEdge R630 idrac version 2.41.40.40 (Build 07)
Could you please check and suggest on this ?
Regards
I'm using the 1.1 branch with ansible 2.7.1. Running the following:
tasks:
- name: get config profile
dellemc_export_server_config_profile:
idrac_ip: "{{ ip }}"
idrac_user: "{{ user }}"
idrac_pwd: "{{ password }}"
export_format: 'JSON'
job_wait: 'True'
share_name: "{{ output_dir }}"
scp_components: 'IDRAC'
Results in this:
Traceback (most recent call last):
File "<stdin>", line 113, in <module>
File "<stdin>", line 105, in _ansiballz_main
File "<stdin>", line 48, in invoke_module
File "/tmp/ansible_dellemc_export_server_config_profile_payload_xSwZ3B/__main__.py", line 223, in <module>
File "/tmp/ansible_dellemc_export_server_config_profile_payload_xSwZ3B/__main__.py", line 209, in main
File "/tmp/ansible_dellemc_export_server_config_profile_payload_xSwZ3B/ansible_dellemc_export_server_config_profile_payload.zip/ansible/module_utils/dellemc_idrac.py", line 72, in connect
File "/usr/local/lib/python2.7/dist-packages/omsdk/sdkinfra.py", line 144, in get_driver
return self._create_driver(mod, ipaddr, creds, protopref, pOptions)
File "/usr/local/lib/python2.7/dist-packages/omsdk/sdkinfra.py", line 165, in _create_driver
drv = self.disc_modules[mod].is_entitytype(self, ipaddr, creds, protopref, mod, pOptions)
File "/usr/local/lib/python2.7/dist-packages/omsdk/sdkbase.py", line 147, in is_entitytype
if entity.connect():
File "/usr/local/lib/python2.7/dist-packages/omsdk/sdkbase.py", line 251, in connect
return self.my_connect(pOptions)
File "/usr/local/lib/python2.7/dist-packages/omsdk/sdkbase.py", line 258, in my_connect
retval = self.cfactory.identify(self.entityjson)
File "/usr/local/lib/python2.7/dist-packages/omsdk/sdkconnfactory.py", line 100, in identify
self.enumerate_list(ejson, *self.pfactory.classifier)
File "/usr/local/lib/python2.7/dist-packages/omsdk/sdkconnfactory.py", line 191, in enumerate_list
comp_details = self.enumerate_view(comp)
File "/usr/local/lib/python2.7/dist-packages/omsdk/sdkconnfactory.py", line 126, in enumerate_view
retval = connection.enumerate_view(index, True)
File "/usr/local/lib/python2.7/dist-packages/omsdk/sdkproto.py", line 408, in enumerate_view
return self._enumerate_view(index, self.views, bTrue)
File "/usr/local/lib/python2.7/dist-packages/omsdk/sdkproto.py", line 433, in _enumerate_view
(valid, flist) = chk_func(retval['Data'][clsName], clsName)
TypeError: satisfyme() takes exactly 1 argument (2 given)
Received "Error: 'NoneType' object has no attribute 'format'" issue when run the following playbook
$ cat hosts
[all]
[all:vars]
ansible_connection = local
user = admin
[GenericUtility]
o3ublv02 ansible_host=10.145.141.109
[GenericControllerCLONE]
o3nblv03 ansible_host=10.145.141.107
[GenericComputeCLONE]
o3cblv02 ansible_host=10.145.141.111
#o1caro07 ansible_host=10.251.131.5
[GenericStorage]
o3sblv03 ansible_host=10.145.141.104
[dell:children]
#GenericUtility
#GenericControllerCLONE
GenericComputeCLONE
#GenericStorage
$ cat dell_get_profile.yml
- name: dell get firmware
hosts: dell
connection: local
gather_facts: no
tasks:
- name: Get Installed Firmware Inventory
dellemc_export_server_config_profile:
idrac_ip: "{{ ansible_host }}"
idrac_user: "{{ idrac_user }}"
idrac_pwd: "{{ idrac_pwd }}"
idrac_port: "443"
share_name: "/tmp"
# share_user: "share_user"
# share_pwd: "share_pwd"
scp_components: "ALL"
job_wait: "True"
# register: output
# - name: print output
# debug:
# var: output
...
$ansible-playbook -i hosts dell_get_profile.yml -vvvv
ansible-playbook 2.5.0
config file = /home/VChong1/.ansible.cfg
configured module search path = [u'/usr/lib/python2.7/site-packages/ansible/modules/network/a10;/usr/lib/python2.7/site-packages/ansible/modules/network/f5;/usr/lib/python2.7/site-packages/ansible;/home/vchong/projects/library;/usr/share/my_modules;/usr/lib/python2.7/site-packages/ansible/modules/extras/dellemc/server']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 2.7.14 (default, Oct 31 2017, 21:12:13) [GCC 6.4.0]
Using /home/VChong1/.ansible.cfg as config file
setting up inventory plugins
Parsed /home/VChong1/vchong1_git/dell/hosts inventory source with ini plugin
Loading callback plugin skippy of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/skippy.pyc
PLAYBOOK: dell_get_profile.yml ***********************************************************************************************************************************************************************************************************************************************
1 plays in dell_get_profile.yml
PLAY [dell get firmware] *****************************************************************************************************************************************************************************************************************************************************
META: ran handlers
TASK [Get Installed Firmware Inventory] **************************************************************************************************************************************************************************************************************************************
task path: /home/VChong1/vchong1_git/dell/dell_get_profile.yml:16
Using module file /usr/lib/python2.7/site-packages/ansible/modules/extras/dellemc/server/dellemc_export_server_config_profile.py
<10.145.141.111> ESTABLISH LOCAL CONNECTION FOR USER: VChong1
<10.145.141.111> EXEC /bin/sh -c 'echo ~ && sleep 0'
<10.145.141.111> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/VChong1/.ansible/tmp/ansible-tmp-1537227909.41-30071180336274 `" && echo ansible-tmp-1537227909.41-30071180336274="` echo /home/VChong1/.ansible/tmp/ansible-tmp-1537227909.41-30071180336274 `" ) && sleep 0'
<10.145.141.111> PUT /home/VChong1/.ansible/tmp/ansible-local-14496A2F78b/tmpxwGsGp TO /home/VChong1/.ansible/tmp/ansible-tmp-1537227909.41-30071180336274/dellemc_export_server_config_profile.py
<10.145.141.111> EXEC /bin/sh -c 'chmod u+x /home/VChong1/.ansible/tmp/ansible-tmp-1537227909.41-30071180336274/ /home/VChong1/.ansible/tmp/ansible-tmp-1537227909.41-30071180336274/dellemc_export_server_config_profile.py && sleep 0'
<10.145.141.111> EXEC /bin/sh -c '/usr/bin/python /home/VChong1/.ansible/tmp/ansible-tmp-1537227909.41-30071180336274/dellemc_export_server_config_profile.py && sleep 0'
<10.145.141.111> EXEC /bin/sh -c 'rm -f -r /home/VChong1/.ansible/tmp/ansible-tmp-1537227909.41-30071180336274/ > /dev/null 2>&1 && sleep 0'
fatal: [o3cblv02]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"export_format": "XML",
"export_use": "Default",
"idrac": null,
"idrac_ip": "10.145.141.111",
"idrac_port": 443,
"idrac_pwd": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"idrac_user": "root",
"job_wait": true,
"scp_components": "ALL",
"share_name": "/tmp",
"share_pwd": null,
"share_user": null
}
},
"msg": "Error: 'NoneType' object has no attribute 'format'"
}
to retry, use: --limit @/home/VChong1/vchong1_git/dell/dell_get_profile.retry
PLAY RECAP *******************************************************************************************************************************************************************************************************************************************************************
o3cblv02 : ok=0 changed=0 unreachable=0 failed=1
Trying this out for the first time and the documentation seems to be missing something related to setting everything up. I setup a new virtualenv for this, installed ansible, OMSDK and then this ansible module. But this results in a failed task stating "Dell EMC OMSDK library is required for this module".
What am I missing?
Below is the details on what I ran on an Ubuntu Xenial system with the latest updates:
cd ~
mkdir ~/virtualenv
sudo apt-get update
sudo apt-get install -y python-dev python-pip libffi-dev virtualenv build-essential
# ensure latest pip and setuptools
sudo python -m pip install -U pip
sudo pip install -U setuptools
virtualenv ~/virtualenv/dell-ansible
source ~/virtualenv/dell-ansible/bin/activate
# install ansible
pip install ansible
# install omsdk
cd ~/devel/others
git clone https://github.com/dell/omsdk.git
cd omsdk
pip install -r requirements-python2x.txt
sh build.sh 1.2 345
cd dist
pip install omsdk-1.2.345-py2.py3-none-any.whl
# install dellemc-openmanage-ansible-modules
cd ~/devel/others
git clone https://github.com/dell/dellemc-openmanage-ansible-modules.git
dellemc-openmanage-ansible-modules
python install.py
Playbook:
---
- hosts: all
connection: local
name: Gather firmware inventory
gather_facts: false
tasks:
- name: Get Installed Firmware Inventory
dellemc_get_firmware_inventory:
idrac_ip: "{{ inventory_hostname }}"
idrac_user: "{{ drac_username }}"
idrac_pwd: "{{ drac_password }}"
Invocation:
~/virtualenv/dell-ansible/bin/ansible-playbook \
-i "${DRAC_HOSTNAME}," \
--extra-vars="drac_username=${DRAC_USERNAME} drac_password=${DRAC_PASSWORD}" \
drac_firmware_inventory.yml
Output:
PLAY [Gather firmware inventory] **************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
TASK [Get Installed Firmware Inventory] *******************************************************************************************************************************************************************************************************************************************************************************************************************************************************
fatal: [drac_hostname_redacted]: FAILED! => {"changed": false, "msg": "Dell EMC OMSDK library is required for this module"}
PLAY RECAP ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
drac_hostname_redacted : ok=0 changed=0 unreachable=0 failed=1
I've been developing process to deploy R740s and C6420 and have been using these modules from the fw_update_url branch.
On my Dev node (Centos 7.6 Ansible 2.7.8) all is fine. We've deployed new CENTOS7.6 hosts as part of our testing.
Now the dellemc_idrac_firmware is always failing with he following message:
FAILED! => {"msg": "Could not find imported module support code for dellemc_idrac_firmware. Looked for either iDRACConnection.py or dellemc_idrac.py"}
or
TASK [deploy-dell : Update firmware from repository on a HTTP Share] *****************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NameError: global name 'iDRACLicense' is not defined
or other global name XXX is not defined.
I've followed the following steps to install post Ansible 2.7.8
git
clone https://github.com/dell/omsdk.git
cd omsdk/
git checkout fw_update_url
sh build.sh 1.2 345
cd dist
sudo pip install omsdk-1.2.345_-py2.py3-none-any.whl
cd ..
git clone https://github.com/dell/dellemc-openmanage-ansible-modules.git
cd dellemc-openmanage-ansible-modules/
git checkout fw_update_url
git branch
sudo python install.py
Pip freeze output has been matched from working node
adal==1.2.0
ansible==2.7.8
ansible-lint==3.4.21
ansible-review==0.13.4
appdirs==1.4.0
applicationinsights==0.11.7
argcomplete==1.9.4
asn1crypto==0.24.0
azure-cli-core==2.0.35
azure-cli-nspkg==3.0.2
azure-common==1.1.11
azure-graphrbac==0.40.0
azure-keyvault==1.0.0a1
azure-mgmt-batch==4.1.0
azure-mgmt-compute==2.1.0
azure-mgmt-containerinstance==0.4.0
azure-mgmt-containerregistry==2.0.0
azure-mgmt-containerservice==3.0.1
azure-mgmt-dns==1.2.0
azure-mgmt-keyvault==0.40.0
azure-mgmt-marketplaceordering==0.1.0
azure-mgmt-monitor==0.5.2
azure-mgmt-network==1.7.1
azure-mgmt-nspkg==2.0.0
azure-mgmt-rdbms==1.2.0
azure-mgmt-resource==1.2.2
azure-mgmt-sql==0.7.1
azure-mgmt-storage==1.5.0
azure-mgmt-trafficmanager==0.50.0
azure-mgmt-web==0.32.0
azure-nspkg==2.0.0
azure-storage==0.35.1
Babel==0.9.6
backports.ssl-match-hostname==3.5.0.1
bcrypt==3.1.4
bigsuds==1.0.4
certifi==2018.10.15
cffi==1.11.5
chardet==3.0.4
colorama==0.4.0
configparser==3.5.0
cryptography==2.2.2
dnspython==1.16.0
entrypoints==0.2.3
enum34==1.1.6
f5-icontrol-rest==1.3.11
f5-sdk==3.0.17
flake8==2.0
future==0.17.1
httplib2==0.9.2
humanfriendly==4.17
idna==2.6
iniparse==0.4
ipaddress==1.0.22
isodate==0.6.0
Jinja2==2.10
jmespath==0.9.0
keyring==16.0.2
kitchen==1.1.1
knack==0.3.3
MarkupSafe==1.0
mccabe==0.6.1
monotonic==1.5
msrest==0.4.29
msrestazure==0.4.31
netaddr==0.7.19
ntlm-auth==1.2.0
oauthlib==2.1.0
omsdk===1.2.345-
packaging==18.0
paramiko==2.4.1
passlib==1.7.1
pep8==1.4.6
ply==3.4
pyasn1==0.4.2
pycparser==2.18
pycryptodomex==3.7.0
pycurl==7.19.0
pyflakes==1.3.0
Pygments==2.2.0
pygobject==3.22.0
pygpgme==0.3
PyJWT==1.6.4
pyliblzma==0.5.3
PyNaCl==1.2.1
pyOpenSSL==18.0.0
pyparsing==2.3.0
pysmi==0.3.2
pysnmp==4.4.6
pysnmp-mibs==0.1.6
python-dateutil==2.7.5
python-version==0.0.2
pyvmomi==6.5.0.2017.5.post1
pywinrm==0.2.2
pyxattr==0.5.1
PyYAML==3.12
requests==2.20.1
requests-ntlm==1.1.0
requests-oauthlib==1.0.0
SecretStorage==2.3.1
six==1.11.0
suds==0.4
tabulate==0.8.2
unidiff==0.5.4
urlgrabber==3.10
urllib3==1.24.1
xmltodict==0.11.0
yum-metadata-parser==1.1.4
Hi,
I am trying to run getfirmwareinventory.yml had below issues.Can someone help to fix it?
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'module' object has no attribute 'noValue'
fatal: [172.21.35.235]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File "/tmp/ansible_NQzfD_/ansible_module_dellemc_get_firmware_inventory.py", line 18, in \n from ansible.module_utils.dellemc_idrac import *\n File "/tmp/ansible_NQzfD_/ansible_modlib.zip/ansible/module_utils/dellemc_idrac.py", line 21, in \n File "/usr/lib/python2.7/site-packages/omsdk/sdkcreds.py", line 27, in \n from omsdk.sdkprint import PrettyPrint\n File "/usr/lib/python2.7/site-packages/omsdk/sdkprint.py", line 44, in \n from pysnmp.hlapi import *\n File "/usr/lib/python2.7/site-packages/pysnmp/hlapi/init.py", line 7, in \n from pysnmp.proto.rfc1902 import *\n File "/usr/lib/python2.7/site-packages/pysnmp/proto/rfc1902.py", line 9, in \n from pysnmp.proto import rfc1155, error\n File "/usr/lib/python2.7/site-packages/pysnmp/proto/rfc1155.py", line 50, in \n class NetworkAddress(univ.Choice):\n File "/usr/lib/python2.7/site-packages/pysnmp/proto/rfc1155.py", line 55, in NetworkAddress\n def clone(self, value=univ.noValue, **kwargs):\nAttributeError: 'module' object has no attribute 'noValue'\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0}
Importing a SCP fails when using a CIFS share. Importing from local works.
Importing via WebGUI works.
System: R7415
iDRAC version: 3.30.30.30
BIOS: 1.7.6
inventory:
all:
children:
servers:
hosts:
c1-drac:
baseuri: "10.113.0.46"
update_share:
# only smb/cifs is supported by this playbooks atm!
username: "user1"
password: "password"
path: '\\10.113.0.244\firmware'
catalog: 'opx-lab\BasicDeploymentFirmware_1.00_Catalog.xml'
deployment: "local"
task:
- name: update System (14G) - upload update-SCP to iDRAC
when: ansible_facts[baseuri]['SystemInventory']['System'][0]['SystemGeneration'] == "14G Monolithic"
dellemc_idrac_server_config_profile:
command: import
idrac_ip: "{{ baseuri }}"
idrac_user: "{{ user }}"
idrac_pwd: "{{ password }}"
share_name: "{{ update_share['path'] }}"
share_user: "{{ update_share['username'] }}"
share_pwd: "{{ update_share['password'] }}"
scp_file: "{{ ansible_facts[baseuri]['SystemInventory']['System'][0]['ServiceTag'] }}-scp.xml"
scp_components: "ALL"
job_wait: "True"
shutdown_type: "Forced"
register: result
until: result is changed
retries: 3
delay: 10
delegate_to: localhost
Error Message:
FAILED - RETRYING: update System (14G) - upload update-SCP to iDRAC (1 retries left).Result was: {
"attempts": 3,
"changed": false,
"invocation": {
"module_args": {
"command": "import",
"end_host_power_state": "On",
"export_format": "XML",
"export_use": "Default",
"idrac_ip": "10.113.0.46",
"idrac_port": 443,
"idrac_pwd": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"idrac_user": "root",
"job_wait": true,
"scp_components": "ALL",
"scp_file": "90YSGL2-scp.xml",
"share_name": "\\\\10.113.0.244\\firmware",
"share_pwd": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"share_user": "user1",
"shutdown_type": "Forced"
}
},
"msg": "Failed to import scp.",
"retries": 4,
"scp_status": {
"Data": {
"Message": "returned status code doesn't match with the expected success code",
"Status": "Failed",
"StatusCode": 400
},
"Message": "none",
"Status": "Failed",
"StatusCode": 400,
"error": {
"error": {
"@Message.ExtendedInfo": [
{
"Message": "The property Username is a required property and must be included in the request.",
"MessageArgs": [
"Username"
],
"[email protected]": 1,
"MessageId": "Base.1.2.PropertyMissing",
"RelatedProperties": [
"Username"
],
"[email protected]": 1,
"Resolution": "Ensure that the property is in the request body and has a valid value and resubmit the request if the operation failed.",
"Severity": "Warning"
}
],
"code": "Base.1.2.GeneralError",
"message": "A general error has occurred. See ExtendedInfo for more information"
}
},
"file": "\\\\10.113.0.244\\firmware\\90YSGL2-scp.xml",
"retval": true
}
}
Allways
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.