dell / dellemc-openmanage-ansible-modules

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

Unable to communicate with iDRAC #368

Closed rht-rkaruppu closed 2 years ago

rht-rkaruppu commented 2 years ago
Question

Issue while using idrac module

Details

playbook:

ansible-playbook idrac.yml -i ../inventory/inventory-waldorf-ipmi-ceph.yaml -vvv

cat iddrac.yml

- hosts: all
  connection: local
  gather_facts: False
  collections:
    - dellemc.openmanage

  tasks:
  - name: Get hardware inventory
    dellemc.openmanage.dellemc_get_system_inventory:
      idrac_ip: "{{ ansible_host }}"
      idrac_user: "{{ ansible_user }}"
      idrac_password: "{{ ansible_password }}"

[rkaruppu@builder-dagoba-dfw3 play]$ cat ../inventory/inventory-waldorf-ipmi-ceph.yaml

all:
  children:
    cephwaldorf:
      vars:
        ansible_python_interpreter: /usr/bin/python3
     #hostname: 'ceph00-waldorf-dfw3.ole.redhat.com'
      hosts:
        ceph00-waldorf-dfw3:
          ansible_host: '10.222.8.231'
          canonical_hostname: ceph00-waldorf-dfw3.ole.redhat.com
          ansible_user: 'root'
          ansible_password: ********

Error:

The full traceback is:
  File "/tmp/ansible_dellemc.openmanage.dellemc_get_system_inventory_payload_jcaa3ycy/ansible_dellemc.openmanage.dellemc_get_system_inventory_payload.zip/ansible_collections
/dellemc/openmanage/plugins/modules/dellemc_get_system_inventory.py", line 130, in main                                                                                     
  File "/tmp/ansible_dellemc.openmanage.dellemc_get_system_inventory_payload_jcaa3ycy/ansible_dellemc.openmanage.dellemc_get_system_inventory_payload.zip/ansible_collections
/dellemc/openmanage/plugins/module_utils/dellemc_idrac.py", line 93, in __enter__
    raise RuntimeError(msg)
fatal: [ceph00-waldorf-dfw3]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "ca_path": null,
            "idrac_ip": "10.222.8.231",
            "idrac_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "idrac_port": 443,
            "idrac_user": "root",
            "timeout": 30,
            "validate_certs": true
        }
    },
    "msg": "Unable to communicate with iDRAC 10.222.8.231. This may be due to one of the following: Incorrect username or password, unreachable iDRAC IP or a failure in TLS/
SSL handshake."
}

PLAY RECAP ******************************************************************************************************************************************************************
ceph00-waldorf-dfw3        : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0 

Manual test result which is working: ############################

[rkaruppu@builder-dagoba-dfw3 play]$ ping 10.222.8.231 PING 10.222.8.231 (10.222.8.231) 56(84) bytes of data. 64 bytes from 10.222.8.231: icmp_seq=1 ttl=64 time=1.10 ms 64 bytes from 10.222.8.231: icmp_seq=2 ttl=64 time=1.34 ms 64 bytes from 10.222.8.231: icmp_seq=3 ttl=64 time=1.26 ms ^C --- 10.222.8.231 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 5ms rtt min/avg/max/mdev = 1.102/1.231/1.335/0.096 ms [rkaruppu@builder-dagoba-dfw3 play]$ nc -vz 10.222.8.231 22 Ncat: Version 7.70 ( https://nmap.org/ncat ) Ncat: Connected to 10.222.8.231:22. Ncat: 0 bytes sent, 0 bytes received in 0.01 seconds.

sachin-apa commented 2 years ago

@rht-rkaruppu : All module now validate SSL certificates by default, Please look at the SSL Validation for more information. if you wish to disable SSL validation please add validate_certs module argument to False

rht-rkaruppu commented 2 years ago

Thanks for the quick response..! It works after adding Validate_certs: False in the play.

sachin-apa commented 2 years ago

@rht-rkaruppu : Thanks for the update, I'm now closing this issue as the playbooks are working fine after the playbook update.