Merge "Also pass blacklisted hostnames"

This commit is contained in:
Zuul
2018-01-17 19:04:20 +00:00
committed by Gerrit Code Review
3 changed files with 23 additions and 0 deletions

View File

@@ -66,6 +66,10 @@ parameters:
description: List of IP addresses belong to blacklisted servers
type: comma_delimited_list
default: []
blacklisted_hostnames:
description: List of hostnames belong to blacklisted servers
type: comma_delimited_list
default: []
conditions:
{% for step in range(1, deploy_steps_max) %}
@@ -178,6 +182,7 @@ resources:
{{r.name}}: {get_param: [role_data, {{r.name}}, merged_config_settings]}
{%- endfor %}
blacklisted_ip_addresses: {get_param: blacklisted_ip_addresses}
blacklisted_hostnames: {get_param: blacklisted_hostnames}
evaluate_env: false
UPDATE:
workflow: { get_resource: WorkflowTasks_Step{{step}} }
@@ -189,6 +194,7 @@ resources:
{{r.name}}: {get_param: [role_data, {{r.name}}, merged_config_settings]}
{%- endfor %}
blacklisted_ip_addresses: {get_param: blacklisted_ip_addresses}
blacklisted_hostnames: {get_param: blacklisted_hostnames}
evaluate_env: false
always_update: true
# END workflow_tasks handling

View File

@@ -859,6 +859,15 @@ resources:
- {get_attr: [{{role.name}}, blacklist_ip_address]}
{% endfor %}
BlacklistedHostnames:
type: OS::Heat::Value
properties:
value:
list_concat:
{% for role in roles %}
- {get_attr: [{{role.name}}, blacklist_hostname]}
{% endfor %}
# Post deployment steps for all roles
AllNodesDeploySteps:
type: OS::TripleO::PostDeploySteps
@@ -894,6 +903,7 @@ resources:
- {get_attr: [{{role.name}}MergedConfigSettings, value]}
{% endfor %}
blacklisted_ip_addresses: {get_attr: [BlacklistedIpAddresses, value]}
blacklisted_hostnames: {get_attr: [BlacklistedHostnames, value]}
ServerOsCollectConfigData:
type: OS::Heat::Value

View File

@@ -646,6 +646,13 @@ outputs:
- server_blacklisted
- {get_attr: [{{server_resource_name}}, networks, ctlplane, 0]}
- ""
blacklist_hostname:
description: Hostname of the server if the server is blacklisted, otherwise this output will be an empty string
value:
if:
- server_blacklisted
- {get_attr: [{{server_resource_name}}, name]}
- ""
hostname:
description: Hostname of the server
value: {get_attr: [{{server_resource_name}}, name]}