Book Image

Puppet Cookbook

Book Image

Puppet Cookbook

Overview of this book

Table of Contents (17 chapters)
Puppet Cookbook Third Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Using exported resources


All our recipes up to this point have dealt with a single machine. It is possible with Puppet to have resources from one node affect another node. This interaction is managed with exported resources. Exported resources are just like any resource you might define for a node but instead of applying to the node on which they were created, they are exported for use by all nodes in the environment. Exported resources can be thought of as virtual resources that go one step further and exist beyond the node on which they were defined.

There are two actions with exported resources. When an exported resource is created, it is said to be defined. When all the exported resources are harvested, they are said to be collected. Defining exported resources is similar to virtual resources; the resource in question has two @ symbols prepended. For example, to define a file resource as external, use @@file. Collecting resources is done with the space ship operator, <<| |>&gt...