24 lines
579 B
YAML
24 lines
579 B
YAML
- name: Check that this is Red Hat
|
|
assert:
|
|
that: "ansible_distribution == 'RedHat'"
|
|
tags:
|
|
- rhsub
|
|
|
|
- name: Manage 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-manager repos --{{ item.state }} {{ item.name }}
|
|
with_items: "{{ rhsub_repos }}"
|
|
when: rhsub_repos is defined
|
|
tags:
|
|
- rhsub
|
|
- rhsub_repos
|