O'Reilly logo

Salt Cookbook by Anirban Saha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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
    
  2. Execute ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required