2

I am quite new to Ansible, and have to been able to use it to install packages on 80 remote Ubuntu servers that have no external internet access.

Is it possible to use Ansible to update/patch these Ubuntu servers that have no external internet access? Something similar to running "sudo apt upgrade" on these servers if they had internet access. Is using Ansible a viable solution/option?

I have researched online but no joy. Any assistance or guidance on how to use Ansible to patch/upgrade remote Ubuntu servers that have no external internet access?

1 Answer 1

1

If I understand the question correctly, the problem isn't really related to ansible at all. What you need is a package repository on the local network that can cache or mirror public packages.

There are a number of deb specific options like rsyncmirror or apt-mirror. There are also generic options that hold many different types of binaries and package feeds, like artifactory or sonatype nexus. On top of being able to get your packages into your private network they offer varying levels of control over what packages are made available within the environment. Once you have a local repository on the network, you could use ansible to update the apt sources.list to pull from the local url instead of the internet based repos.

If you don't need any control over what packages are available, making internet repos available through a proxy is also an option, but the above solutions scale better long term.

1
  • Thanks for your input.
    – tango91a
    Jul 20, 2021 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.