sap_vm_provision: Rework role with best practices to align with project#155
Conversation
|
@newkit I have updated all platforms including kubevirt that you are maintaining. I found some issues in existing code that were fixed so I need you to test it with your environment. Make sure to check that variables were updated to remove dependency on wrong variable names and |
ehaefele
left a comment
There was a problem hiding this comment.
LGTM.
Verified provisioning of VMs by using sap_vm_provision on ibmcloud_vs and ibmcloud_powervs.
(Still need to establish an environment on ibmpowervm_vm)
sean-freeman
left a comment
There was a problem hiding this comment.
LGTM - tested on msazure_vm and verified flow/logic/outcomes match everything previously but with a significantly improved code refactoring and cleanse👍 Very happy to see this upgrade!
Awesome effort @marcelmamula 🙂
Scope
This is improvement iteration on amazing role that was created by @sean-freeman and all credit goes to him for great job.
Scope of this PR is to:
vars/main.ymlwhich improves code readability and future maintainability.ansible-core 2.20Variable Naming
All internal variables had to be updated to follow project wide syntax:
__<role name>_fact_<fact name>for facts set during runtime__<role name>_register_<register name>for registers set during runtime<role name>_variablefor all user customizable variables indefaults/main.yml__<role name>_variablefor all internal overrides invars/main.ymlSome short variable names are still kept, but they are strictly limited to
vars:sections, where they are not set as facts, but used as task/block specific variable.Tests
NOTE: Terraform is not part of testing scope, but improvements will be applied there as well.
All changes are being tested using AP4S playbooks.
Linting Results
Before:
After
Passed: 0 failure(s), 0 warning(s) in 72 files processed of 94 encountered. Last profile that met the validation criteria was 'production'.