24 lines
583 B
YAML
24 lines
583 B
YAML
- name: Check that this is Red Hat
|
|
assert:
|
|
that: "ansible_distribution == 'RedHat'"
|
|
tags:
|
|
- rhsub
|
|
|
|
- name: Register Red Hat subscription
|
|
redhat_subscription:
|
|
username: "{{ rhn_username }}"
|
|
password: "{{ rhn_password }}"
|
|
state: "{{ rhsub_state }}"
|
|
autosubscribe: "{{ rhsub_autosubscribe }}"
|
|
tags:
|
|
- rhsub
|
|
- rhsub_register
|
|
|
|
- name: Configure repository subscriptions
|
|
command: subscription-manage repos --{{ item.state }} --{{ item.name }}
|
|
with_items: "{{ rhsub_repos }}"
|
|
when: not rhsub_autosubscribe
|
|
tags:
|
|
- rhsub
|
|
- rhsub_repos
|