Puppet : How to use [package Resource]2024/09/12 |
This is the examples for [package] resource. |
|
[1] | It manages the configuration to keep [apache2] is installed. |
root@dlp:~ #
vi /usr/local/etc/puppet/code/environments/production/manifests/pkg01.pp package { 'apache24': provider => pkgng, ensure => installed, } |
[2] | It manages the configuration to keep the latest [apache2] is installed. |
root@dlp:~ #
vi /usr/local/etc/puppet/code/environments/production/manifests/pkg01.pp package { 'apache24': provider => pkgng, ensure => latest, } |
[3] | It manages the configuration to keep Nginx is not installed. (uninstalled if installed) |
root@dlp:~ #
vi /usr/local/etc/puppet/code/environments/production/manifests/pkg02.pp package { 'nginx': provider => pkgng, ensure => absent, } |
Sponsored Link |