Skip to content

Pkg

The builtin.pkg is a resource that allows you to manage packages on a system.

Specific version

In the names field, if you want to specify a specific version for a package, you can do so with the following syntax : nginx=1.23.3. Where 1.23.3 is the version you want.

Resources parameters

NameDescriptionRequiredDefault
namesList of packages that you want to managetrue
providerWhich package manager to use to install packagefalseapt

Examples

Install package nginx

yaml
- title: "Install nginx"
  type: "builtin.pkg"
  present: true
  data:
    names: ["nginx"]

Install version 1.23.3 of nginx

yaml
- title: "Install nginx"
  type: "builtin.pkg"
  present: true
  data:
    names:
      - "nginx=1.23.3"

Remove package nginx

yaml
- title: "Remove nginx"
  type: "builtin.pkg"
  present: false
  data:
    names: ["nginx"]