community.general.pkgng – Package manager for FreeBSD >= 9.0
This plugin is part of the community.general collection (version 4.2.0).
You might already have this collection installed if you are using the
It is not included in
To check whether it is installed, run
ansible-galaxy collection list.
To install it, use:
ansible-galaxy collection install community.general.
To use it in a playbook, specify:
Manage binary packages for FreeBSD using ‘pkgng’ which is available in versions after 9.0.
When using pkgsite, be careful that already in cache packages won’t be downloaded again.
When used with a loop: each package will be processed individually, it is much more efficient to pass the list directly to the name option.
- name: Install package foo community.general.pkgng: name: foo state: present - name: Annotate package foo and bar community.general.pkgng: name: - foo - bar annotation: '+test1=baz,-test2,:test3=foobar' - name: Remove packages foo and bar community.general.pkgng: name: - foo - bar state: absent # "latest" support added in 2.7 - name: Upgrade package baz community.general.pkgng: name: baz state: latest - name: Upgrade all installed packages (see warning for the name option first!) community.general.pkgng: name: "*" state: latest