dell / dellemc-openmanage-ansible-modules

Dell OpenManage Ansible Modules
GNU General Public License v3.0
335 stars 163 forks source link

Dell console login requirement #15

Closed kumaresan078 closed 5 years ago

kumaresan078 commented 5 years ago

Hi,

I am trying to achieve dell login check via ansible but couldn't get it.We have an requirement to check the dell drac console login authentication via automation through ansible.

Can someone help here? I tried simple "uri" module for web authentication doesn't seems to work.

rajeevarakkal commented 5 years ago

Hi,

Kindly clarify the below points

  1. Do you want to check whether iDRAC login credentials are valid or not?
  2. Or, Are you looking for a automated iDRAC GUI login to check?

In case #1, we can help you out with a custom task or playbook recommendation though we don't have a dedicated module for the same.

With Regards Rajeev

kumaresan078 commented 5 years ago

Hi Rajeev,

Thanks for taking up.

Yes i am looking for to automate dell drac web page accessible and verify login authentication.

Regards Kumaresan

anupamaloke commented 5 years ago

@kumaresan078 , I guess you would be best served by running a simple CURL command with the iDRAC credentials to check whether that login is valid or not. Something like below:

  tasks:
    - name: Check if iDRAC credentials are valid
      shell: curl --head --silent --compressed https://{{idrac_user}}:{{idrac_pwd}}@{{idrac_ip}}/redfish/v1 -k -L
      register: result

    - name: Fail if not 200OK
      fail:
      when: result.stdout.find("200 OK") == -1
kumaresan078 commented 5 years ago

Hi,

The command works for drac 7 and above we have quit bit drac6 server where it fails due to drac6 doesn't support redfish.Is there any other option available for drac6?

Also i found when running getfirmwareinventory.yml or any other playbooks shipped with idrac ansible module throws below error for IDRAC 6 servers but when i login through DRAC 6 Web and then go idrac logs can see successful authentication.That means ansible module works but it reports driver issue due to unable to fetch information.Is there way to trim the python code that checks only login authentication within ansible module?

$ ansible-playbook -i /tmp/hosts1 getfirmwareinventory.yml

PLAY [Get Installed Firmware Inventory] ****

TASK [Get Installed Firmware Inventory] **** fatal: [192.168.92.158]: FAILED! => {"changed": false, "msg": "Could not find device driver for iDRAC with IP Address: 192.168.92.158"}

Regards Kumaresan

rajeevarakkal commented 5 years ago

closing this issue

ssaammoo commented 4 years ago

I saw the problem and then it is closed with solution provided ... can someone advise plz ?