Define ANSIBLE_LIBRARY and ANSIBLE-MODULE_UTILS to point to .../.ansible/collections/ansible_collection/hpe/ilo/plugins/modules and /module_utils
Create a sample yml file based on tasks under /tests folder
hosts: localhost
vars:
username: "admin"
password: "mypassword"
tasks:
name: Get service BIOS attributes
get_service_bios_attributes:
baseuri: "http://10.1.1.3"
username: "admin"
password: "mypassword"
register: result
name: Service BIOS settings in the server
debug:
msg: "{{ result }}"
When executing the playbook: ansible-playbook this_yml, I get this error message:
"Failed to import the required Python library (redfish) on centos-ctrlctr's Python /usr/libexec/platform-python. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"}
Any idea why I get this error?
Thanks for helping
HKD
I configure the following items on my RedHat machine:
Create a sample yml file based on tasks under /tests folder
hosts: localhost
vars: username: "admin" password: "mypassword"
tasks:
name: Get service BIOS attributes get_service_bios_attributes: baseuri: "http://10.1.1.3" username: "admin" password: "mypassword" register: result
name: Service BIOS settings in the server debug: msg: "{{ result }}"
When executing the playbook: ansible-playbook this_yml, I get this error message: "Failed to import the required Python library (redfish) on centos-ctrlctr's Python /usr/libexec/platform-python. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"}
Any idea why I get this error? Thanks for helping HKD