I have a playbook that copies files to remote hosts whose hostnames are dynamically derived in the playbook. if the play is run from the control node it works perfectly if I run from awx I get an error on the delegation
That would not be the /tmp of AWX machine but of the EE. Since you donāt mention or show the exact error Iām going to assume it is related on how the /tmp dir is mounted and sized within the EE. I would suggest to use a mounted directory with plenty of space and adequate permissions from the AWX machine shared with the EE instead.
the file I have to copy is on the host node (mvlmgmt002.sidi.mpi.it) towards remote hosts defined by a dynamic inventory which is why I have to delegate the host node at the moment to understand I solved it in an unprofessional way with scp but it seems to work. ā¦
Below is the workaround to better understand what the problem was
Iām not sure how this would have worked with copy at all, it can only work from the controller to the target. You would have to be using āsynchronizeā ā¦ which does not combine well with become.
Using scp might be the cleanest way to copy files between those 2 hosts. if you did not have direct access from the delegated host to target, you could use scp -3.
Why donāt you include the error? It would make helping you easier.
If it was me, Iād split this task in two: first use the module āfetchā to get the file from mvlmgmt002 on the control node, and then copy to the destination machines.
I tried with fetch but does not workā¦ the problem is the nested containers the delegate directive is complex to manageā¦ another way was get_url but some ports on the vm are closedā¦ at the moment I solved it with scp