Merge "Add special 'all' for deploy_on_servers server name to match all"

This commit is contained in:
Zuul 2018-05-15 12:28:28 +00:00 committed by Gerrit Code Review
commit ab90800ec5
1 changed files with 11 additions and 0 deletions

View File

@ -66,12 +66,23 @@ workflows:
tasks:
check_if_all_servers:
on-success:
- get_servers_matching: <% $.server_name != "all" %>
- get_all_servers: <% $.server_name = "all" %>
get_servers_matching:
action: nova.servers_list
on-success: deploy_on_servers
publish:
servers_with_name: <% task().result._info.where($.name.indexOf(execution().input.server_name) > -1) %>
get_all_servers:
action: nova.servers_list
on-success: deploy_on_servers
publish:
servers_with_name: <% task().result._info %>
deploy_on_servers:
on-success: send_success_message
on-error: send_failed_message