-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for additional module registration #289
Conversation
b609420
to
f32e13c
Compare
Please document the new variable in https://github.com/SUSE/qe-sap-deployment/tree/main/docs/playbooks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ansible/playbooks/registration.yaml
Outdated
retries: 10 | ||
delay: 60 | ||
when: | ||
- ansible_facts['distribution_major_version'] == "12" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leave out
- ansible_facts['distribution_major_version'] == "12"
the task is generic for any kind of SCC channels. Our handling of LTSS is specific for 12sp5 but Ansible Task code is totally agnostic
about it
f32e13c
to
0d684f7
Compare
docs/playbooks/README.md
Outdated
@@ -46,6 +47,15 @@ using `registercloudguest`. If the command is available, it will be used for | |||
registration. If `registercloudguest` is not available then `SUSEConnect` will | |||
be used. | |||
|
|||
There's a task to add any number of additional modules that require a regcode during execution of registration.yaml playbook. The module names and regcodes are injected in the command that calls the playbook an argument with the form of a list of hashes (named sles_modules), either if the playbook is ran standalone, or if it is run through the config.yaml file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a task to add any number of additional modules that require a regcode during execution of registration.yaml playbook. The module names and regcodes are injected in the command that calls the playbook an argument with the form of a list of hashes (named sles_modules), either if the playbook is ran standalone, or if it is run through the config.yaml file. | |
There's a task allowing register additional modules that require a dedicated regcode. | |
The module names and regcodes can be provided in the `ansible-playbook` command line as list of hashes (named sles_modules). |
docs/playbooks/README.md
Outdated
|
||
``` | ||
create: | ||
- registration.yaml (.......other variables here......) -e sles_modules='[{"key":"<module_to_activate","value":"<regcode-for-module>"}]' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you change example using 2 modules? Is it
-e sles_modules='[{"key":"<module_to_activate_1>","value":"<regcode_for_module_1>"}, {"key":"<module_to_activate_2>","value":"<regcode_for_module_2>"}]'
0d684f7
to
f11e0ec
Compare
b853307
to
02e15a3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
state: latest | ||
when: | ||
- ansible_facts['distribution_major_version'] == "12" | ||
- not not_registered_found |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also this one deserve an explanation:
- The article suggest to update cloud-regionsrv-client for 12sp5 PAYG
zypper up
only works if image is registered
d937323
to
cce9747
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just a question/suggestion/comment.
ansible/playbooks/registration.yaml
Outdated
name: cloud-regionsrv-client | ||
state: latest | ||
when: | ||
- ansible_facts['distribution_major_version'] == "12" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line can be removed. Even though we're working on enabling LTSS/LTSS-ES in 12-SP5, updating this package should work in all supported Service Packs.
cce9747
to
cc79efd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This adds a task to add any number of additional modules that require a regcode during execution of
registration.yaml
playbook. The module names and regcodes are injected in the command that calls the playbook as arguments, either if the playbook is ran standalone, or if it is run through the config.yaml file.The format should be like this:
or without the
create
part if running playbook directly.I tried 2 manual deployments, one with use_suseconnect=true and one without it, and ran ansible (containing only registration module).
I put this in config.yaml, in the line calling the registration.yaml file :
Used: https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_loops.html#iterating-over-a-list-of-hashes (added a label as proposed in https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_loops.html#limiting-loop-output-with-label, not sure if we need it in our case)