Hi guys,
I’m a beginner with ansible and I try to deploy a classic virtual machine debian with an ansible playbook from AWX to my ESXI standalone on my Raspberry 4.
But when I run the template, I’ve this error :
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named ‘pyVim’ fatal: [ESXI]: FAILED! => {“ansible_facts”: {“discovered_interpreter_python”: “/usr/libexec/platform-python”}, “changed”: false, “msg”: “Failed to import the required Python library (PyVmomi) on automation-job-144-hcsd8’s Python /usr/libexec/platform-python. Please read the module documentation and install it 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”}
So I decide to create my own awx-ee by following this tutorial : https://www.linkedin.com/pulse/creating-custom-ee-awx-phil-griffiths/
And by adding pyVmomi and pyVim in my requirements.txt then I build and push to my quay repository. I change my execution environment for my project and my template but now I’ve this error :
Traceback (most recent call last): File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/jobs.py”, line 552, in run res = receptor_job.run() File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/receptor.py”, line 279, in run res = self._run_internal(receptor_ctl) File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/receptor.py”, line 309, in _run_internal result = receptor_ctl.submit_work(worktype=self.work_type, payload=sockout.makefile(‘rb’), params=self.receptor_params, signwork=self.sign_work, **_kw) File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/receptor.py”, line 423, in receptor_params spec_yaml = yaml.dump(self.pod_definition, explicit_start=True) File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/receptor.py”, line 471, in pod_definition default_pod_spec = get_default_pod_spec() File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/utils/execution_environments.py”, line 27, in get_default_pod_spec raise RuntimeError(“Unable to find an execution environment.”) RuntimeError: Unable to find an execution environment.
There is someone to help me ?
Thanks a lot !