Last active
August 29, 2015 14:03
-
-
Save Apsu/703837618aeb88bfd07d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- copies: | |
cinder-blah: 0 | |
neutron-agents: 6 | |
- cidr: 10.0.0.0/24 | |
- vip: 10.0.0.250 | |
- infra_hosts: | |
- infra1: | |
ip: 10.0.0.1 | |
- copies: | |
neutron-agents: 0 | |
- infra2: | |
ip: 10.0.0.2 | |
- infra3: | |
ip: 10.0.0.3 | |
- compute_hosts: | |
- compute1: | |
ip: 10.0.0.4 | |
- compute2: | |
ip: 10.0.0.5 | |
- compute3: | |
ip: 10.0.0.6 | |
- storage_hosts: | |
- cinder1: | |
ip: 10.0.0.10 | |
- swift1: | |
ip: 10.0.0.20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// User specified | |
"all": { | |
"vars": { | |
"vip_address": "10.0.0.250" | |
} | |
}, | |
"infra_hosts": { | |
"hosts": ["infra1", "infra2", "infra3"] | |
}, | |
"compute_hosts": { | |
"hosts": ["compute1", "compute2"] | |
}, | |
"storage_hosts": { | |
"hosts": ["cinder1", "swift1"] | |
}, | |
// Dynamically generated | |
"hosts": { | |
"children": ["infra_hosts", "compute_hosts"] | |
}, | |
"containers": { | |
"children": ["infra_containers", "compute_containers"] | |
}, | |
"infra_containers": { | |
"children": ["glance-api"] | |
}, | |
"glance-api": { | |
"hosts": ["infra1-glance-api-1234", "infra2-glance-api-5678"] | |
}, | |
"compute_containers": { | |
"children": ["nova-all"] | |
}, | |
"nova-all": { | |
"children": ["nova-compute", "nova-api-os-compute"] | |
}, | |
"nova-compute": { | |
"hosts": ["compute1-nova-compute-1234", "compute2-nova-compute-5678"] | |
}, | |
"neutron-all": { | |
"children": ["neutron-linuxbridge-agent", "neutron-agents"] | |
}, | |
"neutron-linuxbridge-agent": { | |
"hosts": [ | |
"compute1-nova-compute-1234", | |
"compute2-nova-compute-5678", | |
"infra1-neutron-agent-8972" | |
] | |
}, | |
"_meta": { | |
"hostvars": { | |
// User specified | |
"infra1": { | |
"ansible_ssh_host": "10.0.0.1" | |
}, | |
"infra2": { | |
"ansible_ssh_host": "10.0.0.2" | |
}, | |
"infra3": { | |
"ansible_ssh_host": "10.0.0.3" | |
}, | |
"compute1": { | |
"ansible_ssh_host": "10.0.0.4" | |
}, | |
"compute2": { | |
"ansible_ssh_host": "10.0.0.5" | |
}, | |
// Dynamically generated | |
"nova-compute.1234": { | |
"ansible_ssh_host": "1.2.3.4", | |
"container_name": "nova-compute" | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Build Infra Containers | |
host: infra_hosts | |
tasks: | |
- name: Build Containers | |
something: blah {{hostvars[item].ansible_ssh_host}} | |
with_items: group["infra_containers"] | |
- name: Build Compute Containers | |
host: compute_hosts | |
tasks: | |
- name: Build Containers | |
something: blah {{hostvars[item].ansible_ssh_host}} | |
with_items: group["compute_containers"] | |
- name: Provision Containers Common | |
host: containers | |
roles: | |
- common_container | |
- name: Provision Keystone | |
host: keystone-all | |
roles: | |
- keystone_common | |
- keystone_api | |
- name: Provision Keystone Setup | |
host: keystone-all[0] | |
roles: | |
- keystone_setup | |
- name: Provision Nova | |
host: nova-all | |
roles: | |
- nova_common | |
- name: Provision Nova Setup | |
host: nova-all[0] | |
roles: | |
- nova_setup | |
- nova_api |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment