TripleO Ansible project repository. Contains playbooks for use with TripleO OpenStack deployments.
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.
 
 
 
 

45 lines
2.0 KiB

---
# We don't want to get false positive on subscription manager network
# issues, hence the logic in the retries/until.
- name: get current release settings
command: 'subscription-manager release --show'
register: subscribed_release
ignore_errors: true
retries: 5
delay: 3
until: ('ConnectionRefusedError' not in subscribed_release.stderr and subscribed_release is failed) or subscribed_release is success
- name: fails if not registered
fail:
msg: >-
Your environment is not subscribed!
If it is expected, please set SkipRhelEnforcement to true.
For Director the documentation is there
https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.0/html-single/
director_installation_and_usage/index#configuring-the-undercloud-with-environment-files,
for the Overcloud you need to add a new parameter file to your deploy
command with that parameter set.
If this is unexpected, you have to subscribe this node and
ensure that RHEL is pinned to {{ tripleo_redhat_enforce_os }} as
this is the only version supported for {{ tripleo_redhat_enforce_osp }}.
when:
- subscribed_release is failed
- ( 'This system is not yet registered' in subscribed_release.stderr )
- name: unknown failure during call to subscription-manager
fail:
msg: >-
Unknow failure during 'subscription-manager release --show':
{{ subscribed_release.stderr }}
when:
- subscribed_release is failed
- ( 'This system is not yet registered' not in subscribed_release.stderr )
- name: fails if the release is not correct
fail:
msg: >-
OSP{{ tripleo_redhat_enforce_osp }} is only supported with Red Hat {{ tripleo_redhat_enforce_os }}.
Please make sure to pin rhel to {{ tripleo_redhat_enforce_os }} using:
subscription-manager release --set={{ tripleo_redhat_enforce_os }}.
You can then proceed with the update.
when: tripleo_redhat_enforce_os not in subscribed_release.stdout