~cloud-init-dev/cloud-init/trunk

Viewing all changes in revision 1143.

  • Committer: Scott Moser
  • Date: 2015-09-08 20:53:59 UTC
  • Revision ID: smoser@ubuntu.com-20150908205359-smh83m5eg2ic3qbd
  power_state: support 'condition' argument
  
  if 'condition' is provided to config in power_state, then
  consult it before powering off.
  
  This allows the user to shut down only if a condition is met, and
  leave the system in a debuggable state otherwise.
  
  An example is as simple as:
   power_state:
     mode: poweroff
     condition: ['sh', '-c', '[ -f /disable-poweroff ]']

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: