-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #33577 - Only enable Foreman Puppet plugin with Foreman
If the user passed in --no-enable-foreman then the Foreman plugin should not be enabled. The same is true for the CLI side of it. The add-cli migration is changed to respect an already present option that is false in order to properly test this change.
- Loading branch information
Showing
7 changed files
with
60 additions
and
4 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
config/foreman.migrations/20210929144850_disable_puppet_plugins_if_undesired.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This fixes up 20210803130619_add_hammer_puppet_plugin.rb in case foreman::cli | ||
# is disabled | ||
if answers['foreman::cli::puppet'] && !answers['foreman::cli'] | ||
answers['foreman::cli::puppet'] = false | ||
end | ||
# This fixes up 20210708144320_add_foreman_puppet.rb in case foreman is | ||
# disabled | ||
if answers['foreman::plugin::puppet'] && !answers['foreman'] | ||
answers['foreman::plugin::puppet'] = false | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
answers['foreman::cli'] ||= true | ||
unless answers.key?('foreman::cli') | ||
answers['foreman::cli'] = true | ||
end |
10 changes: 10 additions & 0 deletions
10
config/katello.migrations/210929144850-disable-puppet-plugins-if-undesired.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This fixes up 20210803130619-add-hammer-puppet-plugin.rb in case foreman::cli | ||
# is disabled | ||
if answers['foreman::cli::puppet'] && !answers['foreman::cli'] | ||
answers['foreman::cli::puppet'] = false | ||
end | ||
# This fixes up 210708144422-add-foreman-puppet.rb in case foreman is | ||
# disabled | ||
if answers['foreman::plugin::puppet'] && !answers['foreman'] | ||
answers['foreman::plugin::puppet'] = false | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters