Skip to content

Instantly share code, notes, and snippets.

@tima
Last active October 21, 2017 12:57
Show Gist options
  • Save tima/6937100f2e4d069145f5b8a805eb3f1b to your computer and use it in GitHub Desktop.
Save tima/6937100f2e4d069145f5b8a805eb3f1b to your computer and use it in GitHub Desktop.
Lightbulb Lab Layout Data Structure Strawman
# This example shows a var file that would be embedded in
# a lightbulb-provisioner-aws role. Other providers would
# have similar file defining standardized lab layouts and
# machine defintions that are specific to that provider.
lightbulb_lab_layouts:
aws_standard_linux_centos:
control:
- ansible: aws_tower_medium
web:
- node1: aws_centos_micro
- node2: aws_centos_micro
- node3: aws_centos_micro
aws_standard_linux_ha_centos:
control:
- ansible: aws_tower_medium
web:
- node1: aws_centos_micro
- node2: aws_centos_micro
- node3: aws_centos_micro
proxy:
- haproxy: aws_centos_micro
aws_standard_linux_mixed:
control:
- ansible: aws_tower_medium
web:
- node1: aws_centos_micro
- node2: aws_centos_micro
- node4: aws_debian_micro
# etc. etc.
# Here under lightbulb_lab_machines only the machine type name matters
# beyond the cloud provider role itself.
lightbulb_lab_machines:
aws_centos_micro:
ami_find:
search: foo*
owner: blah
size: t2.micro
storage_gb: 5
aws_centos_medium:
ami_find:
search: foo*
owner: blah
size: t2.medium
storage_gb: 20
aws_centos_tower:
ami_find:
search: foo*
owner: blah
size: t2.medium
storage_gb: 20
aws_rhel_micro:
ami_find:
search: foo*
owner: blah
size: t2.micro
storage_gb: 5
aws_rhel_medium:
ami_find:
search: foo*
owner: blah
size: t2.medium
storage_gb: 20
# This example shows a var file that would be embedded in
# a lightbulb-provisioner-azure role.
lightbulb_lab_layouts:
azure_standard_linux_centos:
control:
- ansible: azure_tower_medium
web:
- node1: azure_centos_micro
- node2: azure_centos_micro
- node3: azure_centos_micro
azure_standard_linux_ha_centos:
control:
- ansible: azure_tower_medium
web:
- node1: azure_centos_micro
- node2: azure_centos_micro
- node3: azure_centos_micro
proxy:
- haproxy: azure_centos_micro
azure_standard_linux_mixed:
control:
- ansible: azure_tower_medium
web:
- node1: azure_centos_micro
- node2: azure_centos_micro
- node4: azure_debian_micro
# etc. etc.
lightbulb_lab_machines:
azure_centos_A1:
azure_image:
offer: centos
publisher: centos
azure_size: Standard_A1
azure_data_disks:
disk_size_gb: 64
managed_disk_type: Standard_LRS
azure_centos_A2:
azure_image:
offer: centos
publisher: centos
azure_size: Standard_A2
azure_data_disks:
disk_size_gb: 64
managed_disk_type: Standard_LRS
# Ansible Doesn't Publish Tower images to Azure yet
lightbulb_lab_layouts:
{{ provider_lab_layout_name }}:
{{ inventory_group }}:
{{ lab_node_name }}: {{ lightbulb_lab_machine_name }}
lightbulb_lab_machines:
{{ lightbulb_lab_machine_name }}:
# what is nested here is specific to the provider
# and the needs to provision instances with their
# associated ansible modules used by the tasks in
# the provider role
{{ provider_info }}: {{ provider_value}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment