On 17.05.2019 06:39, Kevin Kwon wrote:
> 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
>    hosts: DELL-R610
>    tasks:
>    - name: Power OFF Server
>      ipmi_power:
>        name: "192.168.200.211"
>        user: "root"
>        password: "password"
>        timeout: 600
>        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}
>          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


-- 
Kai Stian Olstad

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ab0ad4e7-6f4f-e896-677c-29d84c47e4bb%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to