Closed ghson closed 3 years ago
@ghson , I am unable to reproduce this issue in our local setup. provided below is my environment details. OV - 5.40 hpeOneView - 5.4.0 api version - 2000
This issue is fixed in previous release. Can you please try uninstalling hpeOneView package and reinstall it again and run the ansible playbook.
I tested by setting the target host of the playbook to oneview. I set the target host of the playbook as the localhost where the playbook is running and confirmed that it works normally. Thank you for your support.
I tested as below:
192.0.xxx.193 platform 192.0.xxx.1 oneview
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
platform
[oneview] composer
hosts: platform vars: config: "{{ playbook_dir }}/oneview_config.json"
tasks:
PLAY [platform] ****
TASK [Gathering Facts] ** ok: [platform]
TASK [Gather facts about the FCoE Network with name 'Test FCoE Network Facts'] ** ok: [platform]
PLAY RECAP **** platform : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Scenario/Intent
Trying to run playbook example: oneview_server_profile_template.yml But I stuck in this error UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: This management appliance is a company owned asset and provided for the exclusive use of authorized personnel. Unauthorized use or abuse of this system may lead to corrective action including termination, civil and/or criminal penalties.\n\nPermission denied (publickey,password).", "unreachable": true}
Environment Details
Steps to Reproduce
Install Centos 7.7
install ansible & AWX
clone repository $ git clone https://github.com/HewlettPackard/oneview-ansible.git $ cd oneview-ansible
install python library $ pip install -r requirements.txt
set library variable $ export ANSIBLE_LIBRARY=/path/to/oneview-ansible/library $ export ANSIBLE_MODULE_UTILS=/path/to/oneview-ansible/library/module_utils/
My configuration as below:
[root@localhost examples]# ll /usr/bin/python lrwxrwxrwx. 1 root root 16 Oct 30 16:08 /usr/bin/python -> /usr/bin/python3
[root@localhost examples]# python -m pip list hpeOneView Package Version
ansible 2.10.1 ansible-base 2.10.2 attrs 20.2.0 cached-property 1.5.2 certifi 2020.6.20 cffi 1.14.3 chardet 3.0.4 cryptography 3.2.1 docker 4.3.1 docker-compose 1.23.2 dockerpty 0.4.1 docopt 0.6.2 future 0.18.2 hpeOneView 5.4.0 hpICsp 1.0.2 idna 2.7 importlib-metadata 2.0.0 Jinja2 2.11.2 jsonschema 3.2.0 MarkupSafe 1.1.1 packaging 20.4 pip 20.2.4 pycparser 2.20 pyparsing 2.4.7 pyrsistent 0.17.3 PyYAML 3.13 requests 2.20.1 setuptools 50.3.2 six 1.15.0 texttable 0.9.1 urllib3 1.24.3 websocket-client 0.57.0 zipp 3.4.0
[root@localhost examples]# pwd /root/oneview-ansible/examples
[root@localhost examples]# cat ansible.cfg |grep -v ^$|grep -v ^# [defaults] inventory = hosts library = /root/oneview-ansible/library/ module_utils = /root//oneview-ansible/library/module_utils/ [inventory] [privilege_escalation] [paramiko_connection] [ssh_connection] [persistent_connection] [accelerate] [selinux] [colors] [diff]
[root@localhost examples]# echo $ANSIBLE_LIBRARY /root/oneview-ansible/library [root@localhost examples]# echo $ANSIBLE_MODULE_UTILS /root/oneview-ansible/library/module_utils/
[root@localhost examples]# cat oneview_config.json { "ip": "192.0.xxx.xxx", "credentials": { "userName": "administrator", "password": "password" }, "image_streamer_ip": "", "api_version": 1200 }
[root@localhost examples]# ping 192.0.xxx.xxx PING 192.0.xxx.xxx (192.0.xxx.xxx) 56(84) bytes of data. 64 bytes from 192.0.xxx.xxx: icmp_seq=1 ttl=64 time=0.105 ms 64 bytes from 192.0.xxx.xxx: icmp_seq=2 ttl=64 time=0.115 ms
Expected Result
[What do you expect to happen after taking the steps above?]
I expected the example playbook to run normally.
Actual Result
[What actually happens after the steps above? Include error output or a link to a gist.]
[root@localhost examples]# ansible-playbook oneview_server_profile_template.yml
PLAY [all] **
TASK [Gathering Facts] ** fatal: [192.0.xxx.xxx]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: This management appliance is a company owned asset and provided for the exclusive use of authorized personnel. Unauthorized use or abuse of this system may lead to corrective action including termination, civil and/or criminal penalties.\n\nPermission denied (publickey,password).", "unreachable": true}
PLAY RECAP ** 192.0.202.1 : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0