Debian 12 bookworm
Sponsored Link

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

 

This is the examples for [package] resource.

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