Project

General

Profile

Actions

Feature #16381

closed

Provide module_enabled? helper in hook context

Added by Dominic Cleal over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Difficulty:
Triaged:
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 1 (0 open1 closed)

Blocks Installer - Bug #16240: module_enabled? in post hook returns true when module is disabledClosedDominic Cleal08/23/2016Actions
Actions #1

Updated by Dominic Cleal over 7 years ago

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

Updated by The Foreman Bot over 7 years ago

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

Updated by Dominic Cleal over 7 years ago

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

Also available in: Atom PDF