There is also a less frequently used gencode-local script which outputs code to be run locally. gencode-remote runs on the local machine, but its standard output is sent to the remote machine and executed as a shell script. Gencode Scripts: The gencode-remote script is the main way to actually update the configuration of target nodes.Manifest: A type manifest can instantiate other types, making code re-use easy.It sometimes uses this information to skip creation of the file. The _file type uses explorers to determine whether the file being created already exists. Explorers: In addition to the global explorers described above, types sometimes have their own explorers that collect type-specific information from the remote machine.The _file type takes a group parameter which specifies to which Unix group should own the file. Parameters: Many types cannot be fully described by the object ID, and take additional information in the form of parameters.For example, the _file type's ID is the absolute path to the file. This ID is not random like a UUID, but rather is some unique identifier that is meaningful in relation to the type. The same type cannot be instantiated twice with the same ID. Object ID: When a type is turned into an object, it is passed a unique object ID.Ansible's "roles" are the equivalent of cdist's types. For instance, the _file type can be turned into multiple "objects", each one representing the creation of a certain file. The name "type" is meant as an analog to "class" in an object-oriented language, because a type can be turned into multiple "objects" depending on what parameters are passed to it. Types are instantiated in manifests and are the only way to actually run code on the target machines. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |