I am trying to setup custom hostname to execution environment container.
I have checked the execution environment definition file documentation but cannot find an option on how to setup hostname.
The playbooks that I have will copy files based on the hostname, as the AWX/AAP runs the jobs in container, it fails to copy as hostname is not the expected one.
so it would be helpful, if EE definition file already allows setting hostname.
It may be a good idea to post your Ansible job YAML file here so people may be able to suggest a better approach. Containers are ephemeral and them having a random hostname is part of being ephemeral. There are ways to make a container’s hostname be more consistent, but managing this will introduce complexities that might be best to avoid.
You could set some kind of static variable inside your playbook instead of relying on the hostname to trigger whatever logic is dependent upon it, for instance. It’s hard to say unless you can provide context as to your use-case.