All my Ansible Playbooks
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.
 
 
 
 
 
 

18 lines
594 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
- name: Attach the correct pool id to the new subscription
command: subscription-manager attach --pool=8a85f98159c85ca00159c9ad5a823661 # Red Hat Enterprise Linux Developer Suite
tags: rhn