Book Image

Salt Cookbook

By : Anirban Saha
Book Image

Salt Cookbook

By: Anirban Saha

Overview of this book

Table of Contents (18 chapters)
Salt Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Performing general cloud functions


After the instances are launched, Salt cloud can help us perform a lot of cloud-specific functions on the instances. In this recipe, you will learn about a few such functions, and some resources where we can find more such options.

How to do it...

  1. Execute the following command to get the tags associated with the instance:

    [root@salt-master ~]# salt-cloud -y -a get_tags cookbookapp02
    [INFO    ] salt-cloud starting
    cloudopen_ec2_us_west_2:
        ----------
        ec2:
            ----------
            cookbookapp02:
                ----------
                - key:
                    Role
                - resourceId:
                    i-e50d5ae9
                - resourceType:
                    instance
                - value:
                    Application
                ----------
    .
    .
    .
                ----------
                - key:
                    Environment
                - resourceId:
                    i-e50d5ae9
                - resourceType:
                    instance
                - value:
                    Production...