Hello ,
Finally i got some out ..by using the below code
---
- hosts: localhost
vars:
iLo_IP: '0.0.0.0' #ILO IP
iLo_username: 'username' #ILO IP
iLo_password: 'password' #ILO Password
tasks:
- hpilo_facts:
host: "{{ iLo_IP }}"
login: "{{ iLo_username }}"
password: "{{ iLo_password }}"
delegate_to: localhost
## Not all return values are required, add / remove what is required
- debug: var=hw_bios_version #Ouput BIOS version
- debug: var=hw_product_name # Ouput Product Name
- debug: var=hw_bios_date # Output BIOS Date
- debug: var=hw_ethX # Output Interface Information, for each Interface
- debug: var=hw_system_serial #Output System Serial number
- debug: var=hw_eth_ilo #Output Interface Information for the ILO Network
Interface
- debug: var=hw_uuid # Output Hardware UUID
- debug: var=hw_product_uuid # Output Product UUID here i want to get ILO
Version ( example :ILO 5 ,ILO 4 ,ILO 3 like that) Can some one pls help me
what parameter have to pass on this. thanks-- naveen
On Fri, May 14, 2021 at 1:49 PM Dick Visser <[email protected]> wrote:
> On Fri, 14 May 2021 at 10:11, NAVEEN <[email protected]> wrote:
> >
> > Hi ,
> >
> > As per ansible document only i followed
>
> I don't know which document you are referring to. But not every
> document has *full* examples.
> Start at the beginning, using the link I posted earlier.
> Just to make sure you get the right link, this is it:
> https://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html
>
>
>
>
> >
> > - name: Gather facts from a HP iLO interface only if the system is an HP
> server
> > community.general.hpilo_info:
> > host: YOUR_ILO_ADDRESS
> > login: YOUR_ILO_LOGIN
> > password: YOUR_ILO_PASSWORD
> > when: cmdb_hwmodel.startswith('HP ')
> > delegate_to: localhost
> > register: results
> >
> > - ansible.builtin.fail:
> > msg: 'CMDB serial ({{ cmdb_serialno }}) does not match hardware
> serial ({{ results.hw_system_serial }}) !'
> > when: cmdb_serialno != results.hw_system_serial
> >
> >
> > On Fri, May 14, 2021 at 1:16 PM Dick Visser <[email protected]>
> wrote:
> >>
> >> The structure you have is incomplete. Tasks should go under 'tasks'.
> >> See
> https://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html
> >> for some guidance.
> >>
> >> On Fri, 14 May 2021 at 09:34, NAVEEN <[email protected]> wrote:
> >> >
> >> > Error :
> >> >
> >> > ERROR ! 'community.general.hpilo_info' is not a valid attribute for
> a play
> >> >
> >> > The error appears to be in
> '/home/kondurun/projects/ansible/playbokks/ilo-module.yml' : line 2,column
> 3,but may
> >> > be elsewhere in the file depending on the exact syntax problem.
> >> >
> >> > The offending line appears to be :
> >> > ---
> >> > - name: Gather facts from a HP iLO interface only if the system is an
> HP server
> >> > ^ here
> >> >
> >> > On Fri, May 14, 2021 at 12:57 PM NAVEEN <[email protected]>
> wrote:
> >> >>
> >> >> Code :
> >> >>
> >> >>
> >> >>
> >> >> ---
> >> >> - name: Gather facts from a HP iLO interface only if the system is
> an HP server
> >> >> community.general.hpilo_info:
> >> >> host: wwwwwwwwwwwwwwwwww
> >> >> login: test
> >> >> password: testuser
> >> >> when: cmdb_hwmodel.startwith('HP ')
> >> >> delegate_to: localhost
> >> >> register: results
> >> >> - ansible.builtin.fail:
> >> >> msg: 'CMDB serial ({{ cmdb_serialno }}) does not match hardware
> serial ({{ results.hw_system_serial }}) !'
> >> >> when: cmdb_serialno != results.hw_system_serial
> >> >>
> >> >>
> >> >>
> >> >> On Fri, May 14, 2021 at 12:43 PM Stefan Hornburg (Racke) <
> [email protected]> wrote:
> >> >>>
> >> >>> On 5/14/21 9:06 AM, NAVEEN wrote:
> >> >>> > Written code below screenshot
> >> >>> >
> >> >>>
> >> >>> You have a typo in delegate_to:
> >> >>>
> >> >>> Otherwise please post playbooks and error messages in the mail and
> *not as screenshot*
> >> >>>
> >> >>> Regards
> >> >>> Racke
> >> >>>
> >> >>> > On Fri, May 14, 2021, 10:58 Dick Visser <[email protected]
> <mailto:[email protected]>> wrote:
> >> >>> >
> >> >>> >
> https://docs.ansible.com/ansible/latest/collections/community/general/hpilo_info_module.html
> >> >>> > <
> https://docs.ansible.com/ansible/latest/collections/community/general/hpilo_info_module.html
> >
> >> >>> >
> >> >>> >
> >> >>> > On Fri, 14 May 2021 at 05:07, NAVEEN <[email protected]
> <mailto:[email protected]>> wrote:
> >> >>> >
> >> >>> > Hello guys,
> >> >>> >
> >> >>> > I want to display hp ilo version ,bios version bios date
> raid version.. by using ANSIBLE code .can some one pls
> >> >>> > help me to achive that.
> >> >>> >
> >> >>> > I am new to ansible so pls help me out
> >> >>> >
> >> >>> > --
> >> >>> > 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] <mailto:
> [email protected]>.
> >> >>> > To view this discussion on the web visit
> >> >>> >
> https://groups.google.com/d/msgid/ansible-project/CAB_%3D4oYsnaLHxaAdq8M4gQw6sEWopw3aJ-HOy8jqviXycVWh9g%40mail.gmail.com
> >> >>> > <
> https://groups.google.com/d/msgid/ansible-project/CAB_%3D4oYsnaLHxaAdq8M4gQw6sEWopw3aJ-HOy8jqviXycVWh9g%40mail.gmail.com?utm_medium=email&utm_source=footer
> >.
> >> >>> >
> >> >>> > --
> >> >>> > Sent from a mobile device - please excuse the brevity,
> spelling and
> >> >>> punctuation.
> >> >>> >
> >> >>> > --
> >> >>> > 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] <mailto:
> [email protected]>.
> >> >>> > To view this discussion on the web visit
> >> >>> >
> https://groups.google.com/d/msgid/ansible-project/CAL8fbwN4JrEKkf%3D-ihRb%3D_ve5gq4_1nT%3DLKPvb7C%3D_eMuAzxTg%40mail.gmail.com
> >> >>> > <
> https://groups.google.com/d/msgid/ansible-project/CAL8fbwN4JrEKkf%3D-ihRb%3D_ve5gq4_1nT%3DLKPvb7C%3D_eMuAzxTg%40mail.gmail.com?utm_medium=email&utm_source=footer
> >.
> >> >>> >
> >> >>> > --
> >> >>> > 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] <mailto:
> [email protected]>.
> >> >>> > To view this discussion on the web visit
> >> >>> >
> https://groups.google.com/d/msgid/ansible-project/CAB_%3D4oY8cPiN77u5AUmhXZqbGZ%3D6JoA7Fr1NQZd53_3ZPQr6vA%40mail.gmail.com
> >> >>> > <
> https://groups.google.com/d/msgid/ansible-project/CAB_%3D4oY8cPiN77u5AUmhXZqbGZ%3D6JoA7Fr1NQZd53_3ZPQr6vA%40mail.gmail.com?utm_medium=email&utm_source=footer
> >.
> >> >>>
> >> >>>
> >> >>> --
> >> >>> Ecommerce and Linux consulting + Perl and web application
> programming.
> >> >>> Debian and Sympa administration. Provisioning with Ansible.
> >> >>>
> >> >>> --
> >> >>> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/4dcdaa01-e887-b05a-5305-47b0fe6ca065%40linuxia.de
> .
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Regards
> >> >> Naveen
> >> >
> >> >
> >> >
> >> > --
> >> > Regards
> >> > Naveen
> >> >
> >> > --
> >> > 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAB_%3D4oaFKceUWC_FP_%3DLuTMn-ARtqQ%3DsdcyihmjDkeP%2B-6K8Aw%40mail.gmail.com
> .
> >>
> >>
> >>
> >> --
> >> Dick Visser
> >> Trust & Identity Service Operations Manager
> >> GÉANT
> >>
> >> --
> >> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAL8fbwPt_gmBn6XdZz3gNQXgDvwbvg3yQpUbk8oqjMRdQQW0Gw%40mail.gmail.com
> .
> >
> >
> >
> > --
> > Regards
> > Naveen
> >
> > --
> > 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAB_%3D4oZ5_2-giovoK4XbiY9be2_NkgSzKaXuq%3Ddb9N6-ujxoJQ%40mail.gmail.com
> .
>
>
>
> --
> Dick Visser
> Trust & Identity Service Operations Manager
> GÉANT
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAL8fbwPM9DPRP%2Bg25Oxcb7cc2CKFpsq1hBV8xeAS5MxeFh467A%40mail.gmail.com
> .
>
--
*Regards*
*Naveen *
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAB_%3D4oZCgNhPbywY%2Br%2B_Tfp-eXTQX4q_OT6Hv2kHGxSVsZH6Sw%40mail.gmail.com.