Re: Trigger full os update/upgrade

"'Nick Anderson' via help-cfengine" <[email protected]>
Newsgroups gmane.comp.sysutils.cfengine.general
Message-ID <[email protected]>
      Hello,

      Quite new in CfEngine configuration, and I would like to
      know if there was a way to :

      - Trigger full OS update/upgrade (on supported Linux distro)
      - Launch this update through WEB UI (MISSION PORTAL) ?

      Thx in advance !

Hi,

Sure. Totally doable, in many different ways.

Here is a small contrived example:

First, write your policy to trigger the full os update, guard that with
a class like `OS_update_upgrade_allowed';

,----
| bundle agent __main__
| {
|    methods:
| 
|      OS_update_upgrade_allowed::
| 
|       "Full OS Update/Upgrade"
|         usebundle => full_os_update_upgrade;
| 
| }
| bundle agent full_os_update_upgrade
| {
|   # Describe what is needed to update/upgrade
| 
|   commands:
|     ubuntu::
|       "/usr/bin/do-release-upgrade";
| 
| }
`----
Listing 1: Example Policy

Then, assuming you are using 3.18.x you can use the CMDB functionality
to define the `default:OS_update_upgrade_allowed' class on the hosts you
want to upgrade. Note: by default the CMDB classes are defined in the
`data' namespace, so specifying it with the `default:' prefix lets you
target the default namesapce.

-- 
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/help-cfengine/87ley9b9tj.fsf%40northern.tech.

-- 
Nick Anderson | Doer of Things | (+1) 785-550-1767 | https://northern.tech

-- 
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/help-cfengine/87ley9b9tj.fsf%40northern.tech.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.