Project

General

Profile

Feature #16381

Provide module_enabled? helper in hook context

Added by Dominic Cleal almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

A new function should be added to the hook context to determine if a module is enabled in the current config, which would help when displaying post hooks.

Currently the most obvious method is kafo.config.module_enabled?('foo'), but this may return true if internally the Configuration contains some unpersisted data for the module (issue #16240). Ideally, the .enabled? method should be called on the relevant PuppetModule. This can be done with kafo.modules.find { .. }.enabled?, so a helper would make this more accessible.


Related issues

Blocks Installer - Bug #16240: module_enabled? in post hook returns true when module is disabledClosed2016-08-23

Associated revisions

Revision 5724507a (diff)
Added by Dominic Cleal almost 5 years ago

fixes #16381 - add module_enabled? helper to hook context (#173)

History

#1 Updated by Dominic Cleal almost 5 years ago

  • Blocks Bug #16240: module_enabled? in post hook returns true when module is disabled added

#2 Updated by The Foreman Bot almost 5 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/kafo/pull/173 added

#3 Updated by Dominic Cleal almost 5 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF