From 7185796681e9fca2bb59ab88e4b5a4f4e0ffb98f Mon Sep 17 00:00:00 2001 From: Aleksey Tsalolikhin Date: Wed, 7 Feb 2018 04:31:20 +0000 Subject: [PATCH] split long slide on package management --- cf-primer.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cf-primer.md b/cf-primer.md index 7698925..1ece84a 100644 --- a/cf-primer.md +++ b/cf-primer.md @@ -606,6 +606,17 @@ The next attribute, `package_module`, specifies how CFEngine should interface wi When `version` is left out CFEngine will only ever install or uninstall, but when `version` is set to a particular value like in the example shown, then CFEngine will upgrade **or downgrade** as needed to get that version. + +# Package Management + + bundle agent install { + packages: + "zsh" + policy => "present", + package_module => apt_get, + version => "4.3.10-4.1.el6"; + } + If you only want to upgrade to the latest version, whatever that is, set `version => "latest"`. And of course with `policy => "absent"` you can leave out `version` to ensure there isn't *any* version of the package present, or specify a version to blacklist (uninstall) just that particular version, if it's installed. (You can't use `"absent"` with `"latest"`.)