My Ansible Playbook to install an OpenShift Lab
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

25 lines
760 B

---
- name: This module should only work on RHEL
assert:
that:
- "ansible_os_family == 'RedHat'"
- name: Register this system on RHN
redhat_subscription:
state: present
username: "{{ lookup('env','RHN_LOGIN') }}"
password: "{{ lookup('env','RHN_PASSWORD') }}"
consumer_name: "{{ inventory_hostname }}"
autosubscribe: false
tags: rhn
#
# To know which Pool ID you can use, run the following command on a registered host :
#
# sudo subscription-manager list --available --matches '*OpenShift*'
#
- name: Attach the correct pool id to the new subscription
command: subscription-manager attach --pool={{ lookup('env','RHN_POOLID') }}
when: 'lookup("env","RHN_POOLID") != ""'
tags: rhn