redhat-cop / ee_utilities

This ansible collection includes a number of roles and tools which can be useful for managing Ansible Execution Environments.
https://galaxy.ansible.com/infra/ee_utilities
GNU General Public License v3.0
57 stars 34 forks source link

Remove container image after registry push #4

Closed jangel97 closed 2 years ago

jangel97 commented 2 years ago

Hi,

We are building EE using Ansible Automation Platform (AAP). The role you offer to create EE is awesome but I have one concern and I would like to know what is your point of view.

The build of the container image takes place in the Ansible Automation Platform nodes (in our case), which is why, the size of the directory $HOME/. local/share/containers/storage/ in the AAP nodes grows when building several different EEs.

Would it make sense for you to offer a parameter remove_image_after_push in the redhat-cop.ee_utilites.ee_builder? If set to true, then the role would remove the container image from the node where build takes place right after the container image is successfully pushed to the registry.

What do you think about this possible parameter? If you think it makes sense and may help other users I can open PR with implementation.

Thanks,

jangel97 commented 2 years ago

Now I realised that everything runs in container in AAP and then storage is ephemeral, which is why we would not need the future. Maybe this would be useful for other people running this role from some CI workflows. In any case, will close the issue. Sorry for the inconvenience,