Skip to content

Commit

Permalink
If registration is needed check that reg_code is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
mpagot committed Nov 28, 2024
1 parent c9d30e6 commit 90780b2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ansible/playbooks/registration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@
changed_when: false

# Execute Section
- name: Validate reg code
ansible.builtin.assert:
that:
- reg_code | length > 0
fail_msg: "'reg_code' must not be empty"
success_msg: "'reg_code' is OK"
changed_when: false
when:
- not_registered_found
- is_registercloudguest_bin.rc == 0
- not use_suseconnect | bool

# Start by pre-cleaning all. Only run it if:
# - the registercloudguest binary is available
Expand Down

0 comments on commit 90780b2

Please sign in to comment.