![Marius Cornea](/assets/img/avatar_default.png)
When using activation key with portal registration method we need to provide the repositories list to be enabled. Change-Id: I7aea9173822647a4601167bb2f9e77394d0ed602
34 lines
748 B
YAML
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
|