use of init_projects_container & ephemeral storage use

I would like to know what exactly is container with image init_projects_container_image be used for? Can I use it to mount ephemeral storage and then save files such as backup created by ansible playbook that I will be running as a template from the tower UI?

init_project_container is an init_container, which mean it only exists for a short period of time to help bootstrap the task and web pods.

What you probably want to look into to is “Path to expose to isolated jobs” setting in the UI
https://docs.ansible.com/automation-controller/4.4/html_ko/administration/isolation_variables.html

this would allow you to create a shared volume and mount it into each of your job pods that run your ansible playbooks. You ansible playbooks could write to this directory and it would persist beyond the job run cycle.

AWX Team

Thanks for your answer. Is there an example you can share with configurations for configMap and volume pod that can help in mounting ephemeral storage for awx tower? I know awx-operator repo has something but that doesnt look that explanatory. TIA

You can see a basic working example in the PR that implemented this feature for k8s deployments https://github.com/ansible/awx/pull/11659

Let us know if you have questions about it

AWX Team

Thanks for this. I was able to create a pod, however when I run playbook that needs to save files under folder ‘/runner’ on newly created pod it gives me [Errno 1] Operation not permitted: b’/runner’\n",

Anything I am missing?

Can it be because I am using dockerfile for awx-ee image and have changes user to non-root?

I would probably choose a path other than /runner to try to save data to, as that folder has the project files. You can mount in a directory using the UI option here, Paths to expose to isolated jobs

https://docs.ansible.com/automation-controller/4.4/html_ko/administration/isolation_variables.html

AWX Team