Created
March 3, 2017 10:24
-
-
Save hardys/b1999c500185ccc832f0ac8731174b2a 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
--- | |
version: '2.0' | |
test_nodes_with_profile: | |
description: Find nodes with a specific profile tag | |
input: | |
- profile: test | |
tasks: | |
get_available_nodes: | |
action: ironic.node_list maintenance=False | |
on-success: get_nodes_for_role | |
publish: | |
available_nodes: <% task(get_available_nodes).result.where($.provision_state = 'available').uuid %> | |
get_nodes_for_role: | |
with-items: node_uuid in <% $.available_nodes %> | |
action: ironic.node_get node_id=<% $.node_uuid %> | |
publish: | |
matching_nodes: <% let(profile => concat("profile:", $.profile)) -> task(get_nodes_for_role).result.where($profile in $.properties.capabilities).uuid %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment