Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Fixes #24888 - fix prepending ActionSubject #87

Merged
merged 1 commit into from
Sep 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions app/models/foreman_chef/concerns/host_action_subject.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
module ForemanChef
module Concerns
module HostActionSubject
def self.prepended(base)
base.send :prepend, ForemanTasks::Concerns::ActionSubject
base.send :prepend, ForemanTasks::Concerns::ActionTriggering
end

def update_action
sync_action!
::Actions::ForemanChef::Host::Update
Expand Down
3 changes: 0 additions & 3 deletions app/models/foreman_chef/concerns/host_build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ module ForemanChef
module Concerns
module HostBuild
def self.prepended(base)
base.send :prepend, ForemanTasks::Concerns::ActionSubject
base.send :prepend, ForemanTasks::Concerns::ActionTriggering

base.after_build do |host|
::ForemanTasks.sync_task ::Actions::ForemanChef::Client::Destroy, host.name, host.chef_proxy
# private key is no longer valid
Expand Down
2 changes: 2 additions & 0 deletions lib/foreman_chef/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ class Engine < ::Rails::Engine

::Host::Managed.send :include, ForemanChef::Concerns::HostAndHostgroupExtensions
::Hostgroup.send :include, ForemanChef::Concerns::HostAndHostgroupExtensions
::Host::Managed.send :prepend, ForemanTasks::Concerns::ActionSubject
::Host::Managed.send :prepend, ForemanTasks::Concerns::ActionTriggering
::Host::Managed.send :prepend, ForemanChef::Concerns::HostExtensions
::Hostgroup.send :include, ForemanChef::Concerns::HostgroupExtensions
::SmartProxy.send :prepend, ForemanChef::Concerns::SmartProxyExtensions
Expand Down