![]() With this loop, git is installed as a serial job on host1, host2, and host3. ![]() Ssh yum -enablerepo=rhel-7-server-rpms install git So what do I do when it comes to multiple remote hosts? Well, I could use a loop like: $ for HOST in (host1 host2 host3) do Example 3: Configure multiple remote hosts Okay, but how do I add a repo to a remote host, and then install a package there? Well, I could do something like this: $ ssh yum -enablerepo=rhel-7-server-rpms install git I could temporarily enable a repo (if it is currently disabled in the configuration) and install a package from it with the following command: $ sudo yum -enablerepo=rhel-7-server-rpms install git Easy, right? This example runs the commands manually, and it's simple enough for a single host. Example 1: Subscription-Manager and YUMįirst, enable a repo with the subscription-manager and then install a package via yum with the following command: $ sudo subscription-manager repos -enable=rhel-7-server-rpms Anyway, here are some examples of enabling a repo on a single host and installing a package from it. Well, I guess most of you already know how this works. Add one repo to a host and install a package But first, let me remind you how to do it without Ansible. ![]() In this article, I show you how Ansible makes managing hosts easier by adding a package repository (repo) and installing a package from it. ![]() ![]() Automate Red Hat Enterprise Linux with Ansible and SatelliteĪnsible makes life easier for sysadmins.Ansible Automation Platform trial subscription.A system administrator's guide to IT automation.Ansible Automation Platform beginner's guide. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |