On Thu, Aug 11, 2016 at 08:30:34PM -0700, David Li wrote: > Hi, > > I am relatively new to Ansible. I need to use Ansible from a dev laptop to > set up some servers (both Ubuntu and Centos) that are isolated without any > Internet access. The laptop has Internet access for development and it can > ssh into these servers.
Usually with servers in a protected setup without direct access you have internal repository servers, that will carry the packages for your servers. But you could fire up such a repository on your own laptop and configure the servers to connect to your laptop. For RPM based distributions like CentOS have a look into the createrepo command. "createrepo --update ." inside a directory containing an rpm file will create the necessary infrastructure. If you expose this directory using a webserver you're all done. Now you can use ansibles yum_repository command like: - name: Add repository yum_repository: name: my_laptops_repository description: my repo baseurl: http://my_laptop.example.com/pub/repository And you are ready and setup to install software from this .. For a one shot operation this may be possible, but for larger setups I would recommend to install a repository server that your servers can connect to. Btw. for debian packages for Ubuntu this would work in similar ways. Ansible has an apt_repository module for a longer time than the yum_repository one. Regards, Marcus -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/20160812134940.GG12076%40arch.iathh.local. For more options, visit https://groups.google.com/d/optout.