Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
puppet_dsl [2020/11/20 10:23] – andonovj | puppet_dsl [2020/11/20 10:28] (current) – andonovj | ||
---|---|---|---|
Line 16: | Line 16: | ||
* Resources (e.g. in-build functions & operations: file, user, router, etc, perform individual tasks) | * Resources (e.g. in-build functions & operations: file, user, router, etc, perform individual tasks) | ||
* Classes (e.g. combination of resources, multiple small operations) | * Classes (e.g. combination of resources, multiple small operations) | ||
- | * Manifest (e.g. definitions and declarion of puppet classes) | + | * Manifest (e.g. definitions and declarion of puppet classes, very similar to C# Classes) |
* Modules (e.g. collection of files and manifest, example: mysql & jenkins module) | * Modules (e.g. collection of files and manifest, example: mysql & jenkins module) | ||
- | |||
- | Summarization of these objects you can see below: | ||
- | |||
- | {{ : | ||
Once an object is created it has to go through the chain of release as follows: | Once an object is created it has to go through the chain of release as follows: | ||
Line 27: | Line 23: | ||
{{ : | {{ : | ||
- | So let's see that in an example: | + | =====Resources===== |
+ | As already explained, Puppet has in-build resources and function, we can describe all in-built resources as so: | ||
+ | |||
+ | < | ||
+ | [root@puppetmaster demo]# puppet describe --list | ||
+ | These are the types known to puppet: | ||
+ | augeas | ||
+ | cron - Installs and manages cron jobs | ||
+ | exec - Executes external commands | ||
+ | file - Manages files, including their content, owner ... | ||
+ | filebucket | ||
+ | group - Manage groups | ||
+ | host - Installs and manages host entries | ||
+ | mount - Manages mounted filesystems, | ||
+ | notify | ||
+ | package | ||
+ | resources | ||
+ | schedule | ||
+ | scheduled_task | ||
+ | selboolean | ||
+ | selmodule | ||
+ | service | ||
+ | ssh_authorized_key - Manages SSH authorized keys | ||
+ | sshkey | ||
+ | stage - A resource type for creating new run stages | ||
+ | tidy - Remove unwanted files based on specific crite ... | ||
+ | user - Manage users | ||
+ | whit - Whits are internal artifacts of Puppet' | ||
+ | yumrepo | ||
+ | zfs - Manage zfs | ||
+ | zone - Manages Solaris zones | ||
+ | zpool - Manage zpools | ||
+ | [root@puppetmaster demo]# | ||
+ | </ | ||
+ | |||
+ | Let's discuss some of them here. | ||
- | =====User===== | + | ====User==== |
To create a user, we will use a simple resource (e.g. function: user, to ensure that it exist) | To create a user, we will use a simple resource (e.g. function: user, to ensure that it exist) | ||
Line 119: | Line 150: | ||
</ | </ | ||
- | =====File===== | + | ====File==== |
The File resource is as easy to be used as user. Let's see which attributes are in that resource: | The File resource is as easy to be used as user. Let's see which attributes are in that resource: | ||