Reputation: 101
I am trying to install python3 in an ubuntu container running on AKS using an Ansible Playbook. Here are the steps I am following in the playbook.
I am getting this error in the console of AWX job:
Any idea how I can correct this ? Is there another way to directly install python3 using the deployment file of ubuntu pod ?
Upvotes: 0
Views: 433
Reputation: 44615
Preliminary notes:
Now to your problem. All ansible modules with the only exceptions of raw
and script
require python to be installed on the target machine. It looks like this requirement is not met.
Hence you need to use the raw
module which is specifically made for that (and that you should use only for that as a good practice)
---
- name: install ansible requirements with the low down dirty raw module
raw: apt-get update && apt-get -y --no-install-recommends install python3
But once again, even in a test use case, you should build and deploy an image already containing the requirements for ansible (i.e. already having python). You can easily use any official python image from dockerhub for that as a simple example.
Upvotes: 1