---
- name: "Synchronize  repository '{{ foreman_convert2rhel_rhel7_repo }}'"
  theforeman.foreman.repository_sync:
    username: "{{ foreman_username }}"
    password: "{{ foreman_password }}"
    server_url: "{{ foreman_server_url }}"
    validate_certs: "{{ foreman_validate_certs | default(omit) }}"
    organization: "{{ foreman_organization }}"
    repository: "{{ foreman_convert2rhel_rhel7_repo }}"
    product: "{{ foreman_convert2rhel_rhel7_product }}"
  when: foreman_content_rhel_enable_rhel7

- name: "Synchronize  repository '{{ foreman_convert2rhel_rhel8_repo }}'"
  theforeman.foreman.repository_sync:
    username: "{{ foreman_username }}"
    password: "{{ foreman_password }}"
    server_url: "{{ foreman_server_url }}"
    validate_certs: "{{ foreman_validate_certs | default(omit) }}"
    organization: "{{ foreman_organization }}"
    repository: "{{ foreman_convert2rhel_rhel8_repo }}"
    product: "{{ foreman_convert2rhel_rhel8_product }}"
  when: foreman_content_rhel_enable_rhel8

- name: "Synchronize  repository '{{ foreman_convert2rhel_oracle7_repo }}'"
  theforeman.foreman.repository_sync:
    username: "{{ foreman_username }}"
    password: "{{ foreman_password }}"
    server_url: "{{ foreman_server_url }}"
    validate_certs: "{{ foreman_validate_certs | default(omit) }}"
    organization: "{{ foreman_organization }}"
    repository: "{{ foreman_convert2rhel_oracle7_repo }}"
    product: "{{ foreman_convert2rhel_oracle7_product }}"
  when: foreman_convert2rhel_enable_oracle7

- name: "Synchronize  repository '{{ foreman_convert2rhel_oracle8_repo }}'"
  theforeman.foreman.repository_sync:
    username: "{{ foreman_username }}"
    password: "{{ foreman_password }}"
    server_url: "{{ foreman_server_url }}"
    validate_certs: "{{ foreman_validate_certs | default(omit) }}"
    organization: "{{ foreman_organization }}"
    repository: "{{ foreman_convert2rhel_oracle8_repo }}"
    product: "{{ foreman_convert2rhel_oracle8_product }}"
  when: foreman_convert2rhel_enable_oracle8
