AWX - Update OS

Hello to all,

i setup awx (previus i use only ansible from cli), i create ansible-palybook to run on my linux server the apt update.
Task failed with error:
“fatal: [localhost]: FAILED! => {“changed”: false, “cmd”: “apt-get update”, “msg”: “[Errno 2] No such file or directory: b’apt-get’: b’apt-get’”, “rc”: 2}”…

My playbook are configured in this mode:

#ansible PLAYBOOK UPDATE VM##
#Mattia Maragno#

Hi,

From which user did you launch the playbook? Maybe you have to set become: true.

Regards,

Hi there,

The apt-get binary appears to be missing. Keep in mind in AWX everything runs in a container using an Execution Environment so localhost will mean this container runtime, not your actual host. You need to target your actual server via the inventory instead.

For the error itself, the default AWX Execution Environment, being based on a RHEL image, does not provide apt-related utilities (AFAIK).

HTH,

Vincent