Making pre-allocation floating IP working for the workload
The current workload does not the new servers using the pre-allocated IPs, in some situation, it will be hard to getting floating IPs. This patch will allow a runner to pre-allocating some IPs, then assign IPs to the server they like. Change-Id: I992edb95d5d641983908f38340bb8ed546fc72aa
This commit is contained in:
parent
77439ae873
commit
f8bc95c532
|
@ -6,7 +6,6 @@
|
|||
validate_certs: "{{ app_env.validate_certs }}"
|
||||
state: absent
|
||||
floating_ip_address: "{{ item }}"
|
||||
purge: True
|
||||
server: "{{ hostvars[item].inter_name }}"
|
||||
with_flattened:
|
||||
- "{{ groups['webservers'] }}"
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
config_drive: "{{ app_env.config_drive | default('no') }}"
|
||||
security_groups: lampstack_sg
|
||||
floating_ip_pools: "{{ app_env.public_net_name | default(omit) }}"
|
||||
floating_ips: "{{ app_env.ips[inventory_hostname] }}"
|
||||
reuse_ips: False
|
||||
meta:
|
||||
hostname: "{{ inventory_hostname }}"
|
||||
register: osvm
|
||||
|
|
|
@ -21,6 +21,16 @@ app_env: {
|
|||
stack_size: 4,
|
||||
volume_size: 4,
|
||||
block_device_name: "/dev/vdb",
|
||||
|
||||
# The following section shows how to pre allocate floating IPs for each
|
||||
# server. If you wish not to do that, leave them empty.
|
||||
ips: {
|
||||
apache-1: [],
|
||||
apache-2: [],
|
||||
balancer: [],
|
||||
database: []
|
||||
},
|
||||
|
||||
wp_latest: "http://10.0.10.41/lampstack/wordpress-4.6.1.tar.gz",
|
||||
wp_importer: "http://10.0.10.41/lampstack/wordpress-importer.0.6.3.zip"
|
||||
}
|
||||
|
|
|
@ -22,6 +22,16 @@ app_env: {
|
|||
stack_size: 4,
|
||||
volume_size: 2,
|
||||
block_device_name: "/dev/vdb",
|
||||
|
||||
# The following section shows how to pre allocate floating IPs for each
|
||||
# server. If you wish not to do that, leave them empty.
|
||||
ips: {
|
||||
apache-1: ["9.30.217.34"],
|
||||
apache-2: ["9.30.217.23"],
|
||||
balancer: ["9.30.217.28"],
|
||||
database: ["9.30.217.35"]
|
||||
},
|
||||
|
||||
wp_latest: "http://10.0.10.12/lampstack/wordpress-4.6.1.tar.gz",
|
||||
wp_importer: "http://10.0.10.12/lampstack/wordpress-importer.0.6.3.zip"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue