Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
32 additions
and
30 deletions.
There are no files selected for viewing
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,9 +1,11 @@ | ||
require 'smart_proxy_dynflow' | ||
|
||
module Proxy | ||
# Basic requires for this plugin | ||
module Ansible | ||
require 'smart_proxy_ansible/version' | ||
require 'smart_proxy_ansible/plugin' | ||
require 'smart_proxy_ansible/roles_reader' | ||
require 'smart_proxy_ansible/variables_extractor' | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,14 @@ | ||
module Proxy::Ansible | ||
class Plugin < Proxy::Plugin | ||
http_rackup_path File.expand_path("http_config.ru", File.expand_path("../", __FILE__)) | ||
https_rackup_path File.expand_path("http_config.ru", File.expand_path("../", __FILE__)) | ||
module Proxy | ||
module Ansible | ||
# Calls for the smart-proxy API to register the plugin | ||
class Plugin < Proxy::Plugin | ||
http_rackup_path File.expand_path('http_config.ru', | ||
File.expand_path('../', __FILE__)) | ||
https_rackup_path File.expand_path('http_config.ru', | ||
File.expand_path('../', __FILE__)) | ||
|
||
settings_file "ansible.yml" | ||
plugin :ansible, Proxy::Ansible::VERSION | ||
|
||
after_activation do | ||
begin | ||
require 'smart_proxy_dynflow_core' | ||
require 'foreman_ansible_core' | ||
ForemanAnsibleCore.initialize_settings(Proxy::Ansible::Plugin.settings.to_h) | ||
rescue LoadError => _ | ||
# Dynflow core is not available in the proxy, will be handled | ||
# by standalone Dynflow core | ||
end | ||
settings_file 'ansible.yml' | ||
plugin :ansible, Proxy::Ansible::VERSION | ||
end | ||
end | ||
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