ibm-spectrum-scale-install-infra
ibm-spectrum-scale-install-infra copied to clipboard
[suggestion] Pull shared default variables, handlers, etc. into common role
Currently, default variables are defined for each role individually (roles/*/defaults/main.yml). However, most variables are used by multiple roles — hence, the definitions are largely redundant (i.e. the following files are mostly identical):
$ ls -l roles/core/*/defaults/main.yml
-rw-rw-r--. 1 achim achim 2975 24. Jul 14:20 roles/core/cluster/defaults/main.yml
-rw-rw-r--. 1 achim achim 1580 24. Jul 14:20 roles/core/common/defaults/main.yml
-rw-rw-r--. 1 achim achim 2991 24. Jul 14:20 roles/core/node/defaults/main.yml
-rw-rw-r--. 1 achim achim 72 24. Jul 14:20 roles/core/postcheck/defaults/main.yml
-rw-rw-r--. 1 achim achim 3958 24. Jul 14:20 roles/core/precheck/defaults/main.yml
I would suggest to extract all code that is shared by multiple roles (default variables, handlers, etc.) and move it into the core/common role. All roles which depend on a certain variable/handler/etc. would need need to require the core/common role (through meta/main.yml).