You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After executing this role with no products listed, re-running it will fail because SUSEConnect -s returns the base package as Not Registered. It will attempt to register SLES but will not have a key, failing the role.
- name: Add Subscriptions
command: |
{{ suseconnect_binary }} -p
{{- item['product'] | default(ansible_distribution) }}/
{{- item['version'] | default(ansible_distribution_version) }}/
{{- item['arch'] | default(ansible_machine) }}
{%- if item['key'] is defined %} -r {{ item['key'] }}{% endif %}
when:
- ( suseconnect_status[item['product'] | default(ansible_distribution)] is not defined or
( suseconnect_status[item['product'] | default(ansible_distribution)]['status'] != 'Registered' or
( item['version'] is defined and suseconnect_status[item['product'] | default(ansible_distribution)]['version']|string != item['version']|string ))) or
suseconnect_reregister
with_items: "{{ suseconnect_products }}"
Specifically, this line in the when:
( suseconnect_status[item['product'] | default(ansible_distribution)]['status'] != 'Registered' or
I think, if we have no products listed, we should assume the intent is to remove this box from the SUSE registration, and "Add Subscriptions" should be skipped over. Does that make sense?
The text was updated successfully, but these errors were encountered:
Hi Dan, thanks for your question. I'll haven't needed this role in some time and will have to think about that. I'll get back to this issue in a short while!
After executing this role with no products listed, re-running it will fail because
SUSEConnect -s
returns the base package as Not Registered. It will attempt to register SLES but will not have a key, failing the role.tasks-line60
Specifically, this line in the
when
:I think, if we have no products listed, we should assume the intent is to remove this box from the SUSE registration, and "Add Subscriptions" should be skipped over. Does that make sense?
The text was updated successfully, but these errors were encountered: