Skip to main content
Pure Technical Services

Intersight Cloud Orchestrator - Advanced Workflow

Currently viewing public documentation. Please login to access the full scope of documentation.

Advanced Workflow

In this document, we will walkthrough a more advanced ICO workflow that has been created within the platform.

For a walkthrough of an advanced workflow, we are working with the tasks we covered in the basic  workflow, with one system task and one Executor task (Ansible) added to perform a function which Intersight cannot handle with only system tasks – creating a host with a boot LUN.

We have seen these two tasks previously:

  1. New Storage Host – This task creates a new storage host from a host name & list of IQN/WWNs to be added to it.
  2. Add Host to Storage Host Group – This task takes input of a host name and hostgroup name. It then adds that host name to the hostgroup.  Both the host & hostgroup must already exist.


The additional two tasks are added to complete our workflow:

  1. New Storage Volume – This task creates a new storage volume from the volume name and volume size which are given as inputs.
  2. Invoke Ansible Playbook – This task will execute an Ansible Playbook against the Ansible Executor endpoint.

This task was built to show how we can perform actions with the built-in tasks within Intersight, and then run Executors to extend the capabilities when a task does not exist for a particular operation that needs to be performed.


Based on the two new tasks we have this workflow, we have 3 inputs which are used in this workflow when working with a Pure FlashArray, in addition to the previous 7 inputs from the basic workflow. All of these new inputs are required:

Storage Vendor Volume Options - This input requires a name for the volume to be created, and connects to the appropriate volume options for the specific type of storage platform; this input exists due to these tasks being a generic/vendor-agnostic construct

Volume Capacity – This input requires the user to enter an integer for the volume size, and select from a list of the available unit options for a volume

Ansible Controller - This input uses the object selector for the user to choose an Ansible Executor endpoint already claimed within Intersight

Input Rules

This workflow only has the same 2 input rules which were covered in the basic workflow walkthrough, no additional input rules exist for the new tasks.



Now that we have taken a look at our inputs and input rules, let's look at the mappings for the new tasks that we are using in this workflow, and then explain what these mappings are doing.


In the left most column, we can see the new workflow inputs highlighted that we listed in our 'Inputs' section above.  Each of these workflow inputs shows a second line which identifies which data type that specific input is defined as.

Between the first and second columns, we can see where these workflow inputs are mapped to specific inputs for the two tasks of 'New Storage Volume' and 'Invoke Ansible Playbook'.  From the arrows that show each mapping across these columns, we can see that the two volume-based workflow inputs map to task input for the 'New Storage Volume' task, and the Ansible Controller workflow input is mapped to the matching task input for the 'Invoke Ansible Playbook' task.

Within the third column that lists our task outputs, we can see the only task output mapping that exists is the same 'Storage Host' object which we covered within our basic task workflow walkthrough.

The final column shows that we do not have any workflow outputs.


Function & Result of the Workflow


To give a clear explanation of what is happening during the execution of this workflow (assuming no errors or failures), we will walk through the steps of each task.


For this example, we are providing the following input:

Storage Device: pure-Zw7ukLIf (chosen from object selector)

Host Group: demo-hostgroup (chosen from list of existing host groups)

Host: advancedwalkthrough

WWNs: 20:00:00:25:B5:21:A1:18, 20:00:00:25:B5:21:B1:18

Volume (name): advancedwalkthrough_boot

Volume Size: 62

(Volume) Unit: GiB

Ansible Controller: ubuntudev (chosen from object selector)


First, an API call is initiated from ICO to create our host with the initiators to be connected.

Command/subcommand/arguments from Pure FlashArray audit log:

purehost create advancedwalkthrough --wwnlist 20000025B521B118,20000025B521A118


Next, an API call is initiated from ICO to add our host to the hostgroup.

Command/subcommand/arguments from Pure FlashArray audit log:

purehgroup setattr demo-hostgroup --addhostlist advancedwalkthrough


Next, an API call is initiated from Intersight to create our (boot) volume.

Command/subcommand/arguments from Pure FlashArray audit log:

purevol create --size 62G advancedwalkthrough_boot


Finally, we move outside of the native ICO tasks. ICO will send some input parameters to our Ansible Executor endpoint to run a playbook.

Ansible Controller: (same as chosen from object selector)

Command Line Arguments:  -vv -e \"workflow_hostname=advancedwalkthrough\" -e \"workflow_volumesize=map[VolumeSize:62 VolumeUnit:G]\"

Host Inventory: localhost,

Playbook Path:  /home/jhoughes/code/IntersightAnsible/AdvancedWorkflow.yml

Command Timeout:  60


Our actual Ansible playbook is an easy to follow example, with some values set as hardcoded to make it more understandable:


- name: Configure Pure Storage Environment
  hosts: localhost
  connection: local
  gather_facts: true
    - purestorage.flasharray
    api: 40f3ce3a-44fb-db58-fe86-9e1720050248
    hostname: "{{ workflow_hostname }}"
    volumesize: "{{ workflow_volumesize }}"
    volumename: "{{ workflow_volumename }}"
        name: "{{ hostname }}"
        volume: "{{ hostname }}_boot"
        lun: "1"
        fa_url: "{{ url }}"
        api_token: "{{ api }}"                                    

Command/subcommand/arguments from Pure FlashArray audit log:

purehost connect advancedwalkthrough --vol advancedwalkthrough_boot --lun 1


Upon completion of the workflow, we have our host with connected initiators and a boot volume, which has also been added to our hostgroup.