---
version: '2.0'

name: keystone_actions

workflows:
  get_first_keystone_project:
    type: direct

    output:
      project:
        id: <% $.project_id %>
        name: <% $.project_name %>

    tasks:
      get_project_id:
        action: keystone.projects_list
        publish:
          project_id: <% task(get_project_id).result[0].id %>
        on-success:
          - get_project_name

      get_project_name:
        action: keystone.projects_get project=<% $.project_id %>
        publish:
          project_name: <% task(get_project_name).result.name %>
