theforeman / foreman-ansible-modules

Ansible modules for interacting with the Foreman API and various plugin APIs such as Katello
GNU General Public License v3.0
149 stars 166 forks source link

repositories role -- allow additional product options #1765

Closed rjo-uk closed 3 months ago

rjo-uk commented 3 months ago

When using the repositories role, new products are created if needed by calling the theforeman.foreman.product module. The module allows options such as description and sync_plan to be set for the product.

This change allows the repositories role to use these additional options if they are provided:

Example config:

foreman_products:
    - name: MariaDB
      description: MariaDB Open Source Server
      sync_plan: Weekly sync
      repositories:
        - name: MariaDB 11.2 RHEL 8 - x86_64
          label: mariadb-11-2-for-rhel-8-x86_64-rpms
          content_type: yum
          url: https://mirror.mariadb.org/yum/11.2/rhel8-amd64/
          gpg_key: RPM-GPG-KEY-MariaDB
          download_policy: on_demand
          os_versions: rhel-8