Skip to content

Commit

Permalink
Add support for additional module registration
Browse files Browse the repository at this point in the history
  • Loading branch information
BillAnastasiadis committed Nov 6, 2024
1 parent 354016c commit b609420
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions ansible/playbooks/registration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,27 @@
- not_registered_found
- "(rcg.rc != 0) or (use_suseconnect | bool)"

- name: Debug sles_modules variable
debug:
msg:
- "sles_modules is: {{ sles_modules }}"
- "Type of sles_modules is: {{ sles_modules | type_debug }}"
- "Length of sles_modules is: {{ sles_modules | length }}"

- name: Add additional authenticated modules
ansible.builtin.command: SUSEConnect -p {{ item.key }} -r {{ item.value }}
register: result
until: result is succeeded
retries: 10
delay: 60
when:
- ansible_facts['distribution_major_version'] == "12"
- not_registered_found
- sles_modules is defined and sles_modules | length > 0
loop: "{{ sles_modules }}"
loop_control:
label: "{{ item.key }}"

- name: Check if repos are added after registration
ansible.builtin.command: zypper lr -u
register: repos_after
Expand Down

0 comments on commit b609420

Please sign in to comment.