Closed jherreraBE closed 6 years ago
Thank you for reporting. Adding code today to catch errors, which many functions did not have. Should have everything committed today 10.02, at least for power playbook.
Try again with latest commit
Hi Jose,
I have tested and works ! :-) but I have now another problem. when I launch the playbook with the option "--check" it execute the module --> dangerous !!
7514756@s51lv1c:~/Ansible/drp-sn/ansible $ ansible-playbook -i pipo -u 7514756 power_dell_mdc.yml **--check** -vvv
Using /home/7514756/Ansible/drp-sn/ansible/ansible.cfg as config file
PLAYBOOK: power_dell_mdc.yml *****************************************************************************************************************************************************************
1 plays in power_dell_mdc.yml
PLAY [PowerEdge iDRAC Manage System Power] ***************************************************************************************************************************************************
META: ran handlers
TASK [Turn system power on] ******************************************************************************************************************************************************************
task path: /home/7514756/Ansible/drp-sn/ansible/power_dell_mdc.yml:23
Using module file /home/7514756/Ansible/drp-sn/ansible/module/idrac/library/idrac.py
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: 7514756
<localhost> EXEC /bin/sh -c 'echo ~ && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/7514756/.ansible/tmp/ansible-tmp-1507035172.84-139294187111285 `" && echo ansible-tmp-1507035172.84-139294187111285="` echo /home/7514756/.ansible/tmp/ansible-tmp-1507035172.84-139294187111285 `" ) && sleep 0'
<localhost> PUT /tmp/tmp_LH6EG TO /home/7514756/.ansible/tmp/ansible-tmp-1507035172.84-139294187111285/idrac.py
<localhost> EXEC /bin/sh -c 'chmod u+x /home/7514756/.ansible/tmp/ansible-tmp-1507035172.84-139294187111285/ /home/7514756/.ansible/tmp/ansible-tmp-1507035172.84-139294187111285/idrac.py && sleep 0'
<localhost> EXEC /bin/sh -c '/usr/bin/python /home/7514756/.ansible/tmp/ansible-tmp-1507035172.84-139294187111285/idrac.py; rm -rf "/home/7514756/.ansible/tmp/ansible-tmp-1507035172.84-139294187111285/" > /dev/null 2>&1 && sleep 0'
ok: [rc-s51l007.cmc.be -> localhost] => {
"changed": false,
"invocation": {
"module_args": {
"bootdevice": null,
"category": "SystemPower",
"command": "PowerOn",
"hostname": null,
"idracip": "10.151.88.25",
"idracpswd": "calvin",
"idracuser": "root",
"sharehost": null,
"sharename": null,
"sharepswd": null,
"shareuser": null,
"userid": null,
"username": null,
"userpswd": null,
"userrole": null
}
},
"result": {}
}
META: ran handlers
META: ran handlers
PLAY RECAP ***********************************************************************************************************************************************************************************
rc-s51l007.cmc.be : ok=1 changed=0 unreachable=0 failed=0
7514756@s51lv1c:~/Ansible/drp-sn/ansible $
Thank you. Module does not currently support check mode so I will add code for it. For documentation purposes, I will close this issue and open a new one.
H Jose, OK ! thanks, How can I know when the code is updated ? thanks for the quick responses !!! ;-)
kind regards,
Jonay
Jonay,
I turned off support for check mode, which has effect of not running tasks when passing --check mode. I tested it with some playbooks, but let me know otherwise.
hi,
I tried the the power.yml playbook, but it doesn't work .. Ansible says everything is ok but the server doesn't want to start : `7514756@s51lv1c:~/Ansible/drp-sn/ansible $ ansible-playbook -i pipo -u 7514756 power_dell_mdc.yml -vvv Using /home/7514756/Ansible/drp-sn/ansible/ansible.cfg as config file
PLAYBOOK: power_dell_mdc.yml ** 1 plays in power_dell_mdc.yml
PLAY [PowerEdge iDRAC Manage System Power] **** META: ran handlers
TASK [Turn system power on] *** task path: /home/7514756/Ansible/drp-sn/ansible/power_dell_mdc.yml:23 Using module file /home/7514756/Ansible/drp-sn/ansible/module/idrac-ansible-module-master/library/idrac.py