Enable Ansible error handling per role
Enable any_errors_fatal and max_fail_percentage Ansible options to be set per TripleO role. This change also provides a structure by which future per-role Ansible options can readily be added to group_vars. Closes-Bug: 1760989 Change-Id: I47954717f42f14bae8d9fd2bd17cd8ea1fd787b3
This commit is contained in:
@@ -1011,6 +1011,13 @@ outputs:
|
||||
value:
|
||||
{% for role in roles %}
|
||||
{{role.name}}: {get_attr: [{{role.name}}IpListMap, net_ip_map]}
|
||||
{% endfor %}
|
||||
RoleGroupVars:
|
||||
description: Mapping of roles to ansible group_vars to be applied config in those roles
|
||||
value:
|
||||
{% for role in roles %}
|
||||
{{role.name}}:
|
||||
map_merge: {get_attr: [{{role.name}}, role_group_vars]}
|
||||
{% endfor %}
|
||||
RoleNetHostnameMap:
|
||||
description: Mapping of each network to a list of hostnames for each role
|
||||
|
@@ -236,6 +236,14 @@ parameters:
|
||||
description: |
|
||||
Name of the subnet on ctlplane network for this role.
|
||||
type: string
|
||||
{{role.name}}AnyErrorsFatal:
|
||||
default: yes
|
||||
type: string
|
||||
{#- We generally won't want any failures on HA Controller roles, 15% will cause any 1 node to fail the deploy, #}
|
||||
{#- for a 3 or 5 node Role, making it a fairly safe default. #}
|
||||
{{role.name}}MaxFailPercentage:
|
||||
default: 15
|
||||
type: number
|
||||
|
||||
{% if role.uses_deprecated_params|default(false) %}
|
||||
parameter_groups:
|
||||
@@ -754,3 +762,7 @@ outputs:
|
||||
description: IP address of the server in the {{network.name}} network
|
||||
value: {get_attr: [{{network.name}}Port, ip_address]}
|
||||
{%- endfor %}
|
||||
role_group_vars:
|
||||
value:
|
||||
any_errors_fatal: {get_param: {{role.name}}AnyErrorsFatal}
|
||||
max_fail_percentage: {get_param: {{role.name}}MaxFailPercentage}
|
||||
|
Reference in New Issue
Block a user