Book Image

VMware vRealize Orchestrator Cookbook

By : Daniel Langenhan
Book Image

VMware vRealize Orchestrator Cookbook

By: Daniel Langenhan

Overview of this book

Table of Contents (15 chapters)
VMware vRealize Orchestrator Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

File operations


In this recipe, we will explore how Orchestrator can interact with the filesystem of its operating system. We will also take a look at how to access a network share and execute local files.

Getting ready

Orchestrator needs to be able to access a directory on the local filesystem. To configure this access and set the access rights, take a look at the Configuring access to the local filesystem recipe in Chapter 2, Optimizing Orchestrator Configuration.

In addition to this, you should have administrative (root) access to Orchestrator's operating system.

In my example, I have granted full access (rwx) to the /orchestrator directory.

How to do it...

We have a bit of ground to cover, so let's start!

Writing a file

This part showcases how to write into a file with and without a line feed as well as how to append to an existing file:

  1. Create a new workflow and create the following variables:

    Name

    Type

    Section

    Use

    fileName

    String

    IN

    The name of the file, including its path

    fileContent...