Puppet : How to use [package Resource] |
This is the examples for [package] resource. | |
| [1] | It manages the configuration to keep [httpd] is installed. |
[root@dlp ~]# vi /etc/puppetlabs/code/environments/production/manifests/pkg01.pp package { 'httpd':
provider => yum,
ensure => installed,
}
|
| [2] | It manages the configuration to keep the latest [httpd] is installed. |
[root@dlp ~]# vi /etc/puppetlabs/code/environments/production/manifests/pkg01.pp package { 'httpd':
provider => yum,
ensure => latest,
}
|
| [3] | It manages the configuration to keep Nginx is not installed. (uninstalled if installed) |
[root@dlp ~]# vi /etc/puppetlabs/code/environments/production/manifests/pkg02.pp package { 'nginx':
provider => yum,
ensure => purged,
}
|
No comments:
Post a Comment