HP ILO Firmware info

51 views
Skip to first unread message

NAVEEN

unread,
May 17, 2021, 1:30:32 PM5/17/21
to ansible...@googlegroups.com
Hello Guys ,
Need help.Written code as below ,

  ---
- hosts: localhost
  vars:
    iLo_IP: 'XXXXXXXXXXX'
    iLo_username: 'test'
    iLo_password: 'testuser'
  tasks:
  - name: Get iLO firmware version
    uri:
      url: "https://{{ iLo_IP }}/rest/v1/managers/1"
      method: GET
      user: "{{ ilo_user }}"
      password: "{{ ilo_password }}"
      force_basic_auth: true
      validate_certs: false
      status_code: 200
    with_items: "{{ ilo_addr.results | map(attribute='ansible_facts.ipmi') | list }}"
    register: ilo_version

 - set_fact:
     ilo_firmware: "{{ item.json.Firmware.Current.VersionString.split(' v')[-1] | replace('.', '') }}"
   with_items: "{{ ilo_version.results }}"
   no_log: true


when i execute this ,I am getting below error.can someone pls help me out..

Fatal : [localhost] : FAILED! => { "msg" : "'ilo_addr' is undefined"}

--
Regards
Naveen 

Stefan Hornburg (Racke)

unread,
May 17, 2021, 1:39:04 PM5/17/21
to ansible...@googlegroups.com
> *Fatal : [localhost] : FAILED! => { "msg" : "'ilo_addr' is undefined"}*
>

That's a kind of surprise when ilo_addr is not defined in your playbook, isn't it?

Regards
Racke

> --
> *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
> ansible-proje...@googlegroups.com <mailto:ansible-proje...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAB_%3D4obzR%2B8oUMVN-TAWKHGAn5N6Q-M_DWYW%3D1ptFCCzaB4euQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAB_%3D4obzR%2B8oUMVN-TAWKHGAn5N6Q-M_DWYW%3D1ptFCCzaB4euQ%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.

OpenPGP_signature

Dick Visser

unread,
May 17, 2021, 1:42:10 PM5/17/21
to ansible...@googlegroups.com
You're using a variable that is not defined, while looping over the uri task.
That must have come from somewhere.
So... did you actually write it? Or perhaps copied part of something
else and expected it to magically work.



> --
> 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 ansible-proje...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAB_%3D4obzR%2B8oUMVN-TAWKHGAn5N6Q-M_DWYW%3D1ptFCCzaB4euQ%40mail.gmail.com.

NAVEEN

unread,
May 17, 2021, 1:50:47 PM5/17/21
to ansible...@googlegroups.com
Actually copied .few of them modified..


NAVEEN

unread,
May 17, 2021, 1:54:37 PM5/17/21
to ansible...@googlegroups.com
How to declare that variable to resolve the issue?

On Mon, May 17, 2021, 23:12 Dick Visser <dick....@geant.org> wrote:

Dick Visser

unread,
May 17, 2021, 2:00:46 PM5/17/21
to ansible...@googlegroups.com
On Mon, 17 May 2021 at 19:54, NAVEEN <navee...@gmail.com> wrote:
>
> How to declare that variable to resolve the issue?

Judging by its name, it isn't defined manually, but rather the result
of some previous task (which we don't know anything about).



--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT
Reply all
Reply to author
Forward
0 new messages