# HP ILO set from ansible (no OS installed)

**URL:** <https://forum.ansible.com/t/hp-ilo-set-from-ansible-no-os-installed/27224>\
**Category:** Ansible Project\
**Created:** [April 9, 2018, 8:37am UTC](https://forum.ansible.com/t/hp-ilo-set-from-ansible-no-os-installed/27224 "2018-04-09T08:37:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benny\_Kusman](https://avatars.discourse-cdn.com/v4/letter/b/4da419/32.png) [@Benny\_Kusman](https://forum.ansible.com/u/Benny_Kusman)\
**Post date:** [April 9, 2018, 8:37am UTC](https://forum.ansible.com/t/hp-ilo-set-from-ansible-no-os-installed/27224/1 "2018-04-09T08:37:14Z")

</div>

Hi,

has anyone implemented setting up HP ILO using ansible, when the server has no OS yet ?  
if the server has been installed and has hponcfg command, there is ansible module for it.

But wondering, if anyone has tried to setup the server in the ilo using ansible (just simply specifying the ilo hostname, userid/password, port)

Thanks

---

<div class="post-metadata">

**Author:** ![Dave\_H](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@Dave\_H](https://forum.ansible.com/u/Dave_H)\
**Post date:** [April 10, 2018, 3:38am UTC](https://forum.ansible.com/t/hp-ilo-set-from-ansible-no-os-installed/27224/2 "2018-04-10T03:38:46Z")

</div>

Hi Benny,

There are a couple of development modules in the ansible docs, e.g. [https://docs.ansible.com/ansible/devel/modules/hpilo\_boot\_module.html](https://docs.ansible.com/ansible/devel/modules/hpilo_boot_module.html), but I have not used them.

I use the python package from [http://seveas.github.io/python-hpilo](http://seveas.github.io/python-hpilo) to expose a command line interface and use an example playbook like the following. You have to extract data from the output of the cli but it’s fairly straightforward and very useful.

ansible-playbook -i “localhost,” -c local playbook.yml

`

---

<div class="post-metadata">

**Author:** ![Amarjeet\_Raja](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@Amarjeet\_Raja](https://forum.ansible.com/u/Amarjeet_Raja)\
**Post date:** [April 10, 2018, 4:56am UTC](https://forum.ansible.com/t/hp-ilo-set-from-ansible-no-os-installed/27224/3 "2018-04-10T04:56:05Z")

</div>

Hi Benny,

As far as I know, Ansible doesn’t have any modules which can do inital configuration of an ILO. However, You can automate the ILO configuration using HP Oneview along with ansible. You can find the details in this url : [https://h20195.www2.hpe.com/v2/getpdf.aspx/4AA6-6348ENW.pdf](https://h20195.www2.hpe.com/v2/getpdf.aspx/4AA6-6348ENW.pdf)

Regards,  
Amarjeet

---

<div class="post-metadata">

**Author:** ![Benny\_Kusman](https://avatars.discourse-cdn.com/v4/letter/b/4da419/32.png) [@Benny\_Kusman](https://forum.ansible.com/u/Benny_Kusman)\
**Post date:** [April 10, 2018, 5:58am UTC](https://forum.ansible.com/t/hp-ilo-set-from-ansible-no-os-installed/27224/4 "2018-04-10T05:58:42Z")

</div>

Hi Dave and Amarjeet,

Thanks for the feedback.  
i will give it a try!

Many thanks!

---

<div class="post-metadata">

**Author:** ![Benny\_Kusman](https://avatars.discourse-cdn.com/v4/letter/b/4da419/32.png) [@Benny\_Kusman](https://forum.ansible.com/u/Benny_Kusman)\
**Post date:** [April 11, 2018, 9:10am UTC](https://forum.ansible.com/t/hp-ilo-set-from-ansible-no-os-installed/27224/5 "2018-04-11T09:10:11Z")

</div>

Hi Dave,

So i got this stupid question, where is the library of to put this hpilo ?  
i was looking at [https://github.com/ansible/ansible/issues/7633](https://github.com/ansible/ansible/issues/7633), but couldnt find the solution.

Thank you

---

<div class="post-metadata">

**Author:** ![Dave\_H](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@Dave\_H](https://forum.ansible.com/u/Dave_H)\
**Post date:** [April 13, 2018, 8:00am UTC](https://forum.ansible.com/t/hp-ilo-set-from-ansible-no-os-installed/27224/6 "2018-04-13T08:00:11Z")

</div>

It’s a python library. Create a new virtualenv, activate it, install ansible and python-hpilo and you should be good to run your playbook

`  
virtualenv venv  
. venv/bin/activate  
pip install ansible python-hpilo  
ansible-playbook -i “localhost,” -c local playbook.yml

`

---

<div class="post-metadata">

**Author:** ![Benny\_Kusman](https://avatars.discourse-cdn.com/v4/letter/b/4da419/32.png) [@Benny\_Kusman](https://forum.ansible.com/u/Benny_Kusman)\
**Post date:** [April 17, 2018, 9:32am UTC](https://forum.ansible.com/t/hp-ilo-set-from-ansible-no-os-installed/27224/7 "2018-04-17T09:32:43Z")

</div>

Hi Dave,

thanks!
