---
- name: "Create host group '{{ foreman_convert2rhel_hostgroup7 }}'"
  theforeman.foreman.hostgroup:
    username: "{{ foreman_username }}"
    password: "{{ foreman_password }}"
    server_url: "{{ foreman_server_url }}"
    validate_certs: "{{ foreman_validate_certs | default(omit) }}"
    organization: "{{ foreman_organization }}"
    name: "{{ foreman_convert2rhel_hostgroup7 }}"
    activation_keys: "{{ foreman_convert2rhel_key_centos7 }}"
  when: foreman_content_rhel_enable_rhel7

- name: "Create host group '{{ foreman_convert2rhel_hostgroup8 }}'"
  theforeman.foreman.hostgroup:
    username: "{{ foreman_username }}"
    password: "{{ foreman_password }}"
    server_url: "{{ foreman_server_url }}"
    validate_certs: "{{ foreman_validate_certs | default(omit) }}"
    organization: "{{ foreman_organization }}"
    name: "{{ foreman_convert2rhel_hostgroup8 }}"
    activation_keys: "{{ foreman_convert2rhel_key_centos8 }}"
  when: foreman_content_rhel_enable_rhel8

- name: "Create host group '{{ foreman_convert2rhel_hostgroup_oracle7 }}'"
  theforeman.foreman.hostgroup:
    username: "{{ foreman_username }}"
    password: "{{ foreman_password }}"
    server_url: "{{ foreman_server_url }}"
    validate_certs: "{{ foreman_validate_certs | default(omit) }}"
    organization: "{{ foreman_organization }}"
    name: "{{ foreman_convert2rhel_hostgroup_oracle7 }}"
    activation_keys: "{{ foreman_convert2rhel_key_oracle7 }}"
  when: foreman_convert2rhel_enable_oracle7

- name: "Create host group '{{ foreman_convert2rhel_hostgroup_oracle8 }}'"
  theforeman.foreman.hostgroup:
    username: "{{ foreman_username }}"
    password: "{{ foreman_password }}"
    server_url: "{{ foreman_server_url }}"
    validate_certs: "{{ foreman_validate_certs | default(omit) }}"
    organization: "{{ foreman_organization }}"
    name: "{{ foreman_convert2rhel_hostgroup_oracle8 }}"
    activation_keys: "{{ foreman_convert2rhel_key_oracle8 }}"
  when: foreman_convert2rhel_enable_oracle8
