Ubuntu 22.04
Sponsored Link

Puppet : How to use [package Resource]2023/10/12

 

This is the examples for [package] resource.

[1] It manages the configuration to keep [apache2] is installed.
root@dlp:~#
vi /etc/puppetlabs/code/environments/production/manifests/pkg01.pp
package { 'apache2':
  provider => apt,
  ensure   => installed,
}
[2] It manages the configuration to keep the latest [apache2] is installed.
root@dlp:~#
vi /etc/puppetlabs/code/environments/production/manifests/pkg01.pp
package { 'apache2':
  provider => apt,
  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 => apt,
  ensure   => purged,
}
Matched Content