# IDRAC in DELL R610 with ipmi\_power

**URL:** <https://forum.ansible.com/t/idrac-in-dell-r610-with-ipmi-power/30355>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [May 17, 2019, 4:39am UTC](https://forum.ansible.com/t/idrac-in-dell-r610-with-ipmi-power/30355 "2019-05-17T04:39:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Kwon](https://avatars.discourse-cdn.com/v4/letter/k/77aa72/32.png) [@Kevin\_Kwon](https://forum.ansible.com/u/Kevin_Kwon)\
**Post date:** [May 17, 2019, 4:39am UTC](https://forum.ansible.com/t/idrac-in-dell-r610-with-ipmi-power/30355/1 "2019-05-17T04:39:50Z")

</div>

Hi…

I am trying to power management by “impi\_power”

First, I had checked the “ipmitool” is working on Ansible-Controller like below.

root@ubuntu-Ansible:~#  
root@ubuntu-Ansible:~# ipmitool -I lanplus -H 192.168.200.211 -U root -P password power status  
Chassis Power is on  
root@ubuntu-Ansible:~#

Here is my playbook.

root@ubuntu-Ansible:~# cat Host-Power\_Off-01.yml

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [May 17, 2019, 8:34am UTC](https://forum.ansible.com/t/idrac-in-dell-r610-with-ipmi-power/30355/2 "2019-05-17T08:34:02Z")

</div>

> I am trying to power management by "impi\_power"
> 
> First, I had checked the "ipmitool" is working on Ansible-Controller like  
> below.
> 
> root@ubuntu-Ansible:~#  
> root@ubuntu-Ansible:~# ipmitool -I lanplus -H 192.168.200.211 -U root -P  
> password power status  
> Chassis Power is on  
> root@ubuntu-Ansible:~#
> 
> Here is my playbook.
> 
> root@ubuntu-Ansible:~# cat Host-Power\_Off-01.yml  
> ---  
> - name: Power Off to Host - TEST  
> &nbsp;&nbsp;&nbsp;hosts: DELL-R610  
> &nbsp;&nbsp;&nbsp;tasks:  
> &nbsp;&nbsp;&nbsp;- name: Power OFF Server  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ipmi\_power:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name: "192.168.200.211"  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;user: "root"  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;password: "password"  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timeout: 600  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;state: "on"
> 
> when i ran it, it was failed like below.  
> would you please let me know what is wrong in my playbook?

This playbook is logging in to the host DELL-R610 to run the Ansible module ipmi\_power.  
But I guess you would like to run the mdoule ipmi\_power on the ansible controller aka localhost?

If so you need to delegate the task to localhost with "delegate\_to: localhost" or setting the "connection: local" in the play.

> root@ubuntu-Ansible:~# ansible-playbook Host-Power\_Off-01.yml
> 
> PLAY [Power Off to Host - TEST]  
> \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> TASK [Gathering Facts]  
> \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> fatal: [DELL-R610]: UNREACHABLE! =\> {"changed": false, "msg": "Failed to  
> connect to the host via ssh: root@dell-r610: Permission denied  
> (password).", "unreachable": true}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to retry, use: --limit @/root/Host-Power\_Off-01.retry

In this message you can see that Ansible is trying to login with root@dell-r610

---

<div class="post-metadata">

**Author:** ![Kevin\_Kwon](https://avatars.discourse-cdn.com/v4/letter/k/77aa72/32.png) [@Kevin\_Kwon](https://forum.ansible.com/u/Kevin_Kwon)\
**Post date:** [May 17, 2019, 9:17am UTC](https://forum.ansible.com/t/idrac-in-dell-r610-with-ipmi-power/30355/3 "2019-05-17T09:17:37Z")

</div>

Hi… Kai!

Thank you so much your help!  
after change my playbook like below, it is working successfully.

Have a nice weekend!  
Kevin

root@ubuntu-Ansible:~# cat Host-Power\_Off-01.yml
