Install collection offline for ansible 2.9 on RHEL-7

My ansible control node is disconnected from Internet. I need to install " Containers.Podman" collection in a offline mode on my ansible 2.9 version on RHEL7 machine. Looking for help on recipe.


You could download a old archive from the GitHub repo and upload and extract it on the server?

1 Like

You can also use ansible-galaxy collection download to download a collection tarball (or a specific version of it). Simply copy it over to that server and run ansible-galaxy collection install on it.

You need to make sure that the version you download works with 2.9 though (note that Ansible 2.9 is End of Life) - according to ansible-podman-collections/meta/runtime.yml at master · containers/ansible-podman-collections · GitHub the latest version still supports 2.9 though.

Another potential pitfall is whether the collection has dependencies. I think ansible-galaxy collection download also downloads them by default (unless you specify --no-deps), but in this case it’s not necessary since the collection has no dependencies (ansible-podman-collections/galaxy.yml at master · containers/ansible-podman-collections · GitHub).