Marius Cornea 1b3e473520 Set up repos when using portal with activation key
When using activation key with portal registration method we need
to provide the repositories list to be enabled.

Change-Id: I7aea9173822647a4601167bb2f9e77394d0ed602
2018-11-29 11:42:19 -05:00

34 lines
748 B
YAML

- name: Ensure this is Red Hat
assert:
that: "ansible_facts.distribution == 'RedHat'"
tags:
- rhsm
- name: Inform the operators if both rhsm_activation_key and rhsm_repos are given
debug:
msg: "rhsm_repos and rhsm_activation_key are exclusive options when using Satellite"
when:
- rhsm_repos | length > 0
- rhsm_activation_key is defined
- rhsm_method == 'satellite'
- name: Configure Red Hat Subscription Manager
template:
src: rhsm.conf.j2
dest: /etc/rhsm/rhsm.conf
owner: root
group: root
mode: 0644
tags:
- rhsm
- rhsm_conf
- block:
- include_tasks: "{{ rhsm_method }}.yml"
tags:
- rhsm
- rhsm_register
- rhsm_repos
- rhsm_satellite
- rhsm_unregister