-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Description
Summary
config.cfg lines 141-200 contain cloud provider defaults (instance sizes, images, etc.) that logically belong in the individual cloud role's defaults/main.yml files.
Current Structure
# config.cfg lines 141-200
cloud_providers:
azure:
size: Standard_B1S
osDisk:
type: Standard_LRS
image:
publisher: Canonical
...
digitalocean:
size: s-1vcpu-1gb
image: "ubuntu-22-04-x64"
ec2:
encrypted: true
size: t2.micro
...Proposed Solution
Move each provider's defaults to roles/cloud-<provider>/defaults/main.yml:
# roles/cloud-digitalocean/defaults/main.yml
cloud_providers:
digitalocean:
size: s-1vcpu-1gb
image: "ubuntu-22-04-x64"Or flatten the structure:
# roles/cloud-digitalocean/defaults/main.yml
digitalocean_size: s-1vcpu-1gb
digitalocean_image: "ubuntu-22-04-x64"Benefits
- Better separation of concerns - each role owns its defaults
config.cfgbecomes purely user-facing configuration- Easier to update provider defaults without touching user config
- Cleaner role independence