tasks to manage repos

Post your Debian questions here.

tasks to manage repos

Postby JAMES_KEITH » August 5th, 2019, 1:12 pm

I need you to add a task to manage multiple repos (Debian, SLES, RHEL) into the base role. The task should perform actions to create the necessary repository entries in the host, then trigger an “update packages” type call to verify the host is running the latest packages.

Care should be taken with the RHEL systems since they have a rolling-update model. Performing an update against the LinuxCOE content on a RHEL6 host will update everything and in turn, make a RHEL6.2 host into a RHEL6e host. I would leave RHEL alone until the end.

For the SLES hosts, the service pack level should normally be maintained. SP2 should receive the SP2 repo definition. The errata hosts should receive the errata repo. Errata servers should have a marker file located at /etc/buildadmin with content errata

This is what I have so far:

Code: Select all
  - name: Install EPEL repo.
      name: epel
      description: EPEL YUM repo
      baseurl: http://linuxcoe9.houston.hpecorp.net/LinuxCOE/RedHat-updates-yum/7.4Server/en/os/x86_64
      state: present
      gpgcheck: no
      - (ansible_distribution|lower == "rhel" and ansible_distribution_major_version|int >= 6)
 - name: Install APT repo
     repo: deb http://deb.debian.org/debian/ jessie main contrib non-free
     state: present
     - (ansible_distribution|lower == "debian" and ansible_distribution_major_version|int >= 6)
 - name: Install ZYPPER repo
     name: zypper_repository
     repo: http://linuxcoe9.houston.hpecorp.net/LinuxCOE/SuSE-updates/SLES11-SP4-Updates/sle-11-x86_64/
     - (ansible_distribution|lower == "sles" and ansible_distribution_major_version|int >= 11)

I really don't know if I'm on the right track here! Can anyone help with this please?!
Posts: 3
Joined: July 31st, 2019, 5:41 pm

Return to General Questions

Who is online

Users browsing this forum: No registered users and 1 guest