Ansible tower awx problem with command shell downtime

Hey,

I have one problem with ansible tower awx, i don’t understand why when i execut command for downtime, ansible works but not ansible tower awx.

My task is :

  • name: “Debut du Downtime”
    shell: /opt/jmsagent/bin/jmsagent.sh -q -U ‘my_user’ -P ‘{{my_password}}’ -E PROD --any cmd /MONITORING/centreon_host_adddowntime {{inventory_hostname}} 7200 pause_appli
    register: adddowntime
    delegate_to: 127.0.0.1
    run_once: true

This task works with ansible and not with ansible tower awx … ?

Someone have idea please for solve this problem, please ?? ^^

Thank you very much community ansible !! =)

Regards,

When executing things with AWX the playbooks are executed inside of bubblewrap inside of the awx_task container on the AWX host (or k8s cluster). They do not execute directly on the host AWX runs on. Your task appears to depend on content on the AWX host. Instead of delegating to localhost you would need to delegate to the host where AWX runs.