Skip to content

Commit

Permalink
Merge pull request #14204 from carbonin/change_nginx_port_vars_to_http
Browse files Browse the repository at this point in the history
Use http_port extra variables instead of nginx ones
  • Loading branch information
gtanzillo authored Mar 6, 2017
2 parents acb8c76 + 59a6b9e commit 61dd5d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions lib/embedded_ansible.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ class EmbeddedAnsible
SECRET_KEY_FILE = "/etc/tower/SECRET_KEY".freeze
CONFIGURE_EXCLUDE_TAGS = "packages,migrations,firewall,supervisor".freeze
START_EXCLUDE_TAGS = "packages,migrations,firewall".freeze
NGINX_HTTP_PORT = 54_321
NGINX_HTTPS_PORT = 54_322
HTTP_PORT = 54_321
HTTPS_PORT = 54_322

def self.available?
path = ENV["APPLIANCE_ANSIBLE_DIRECTORY"] || APPLIANCE_ANSIBLE_DIRECTORY
Expand Down Expand Up @@ -67,8 +67,8 @@ def self.services
def self.playbook_extra_variables
json_value = {
:minimum_var_space => 0,
:nginx_http_port => NGINX_HTTP_PORT,
:nginx_https_port => NGINX_HTTPS_PORT
:http_port => HTTP_PORT,
:https_port => HTTPS_PORT
}.to_json
{:e => json_value}
end
Expand Down Expand Up @@ -173,7 +173,7 @@ def self.database_connection
def self.api_connection
admin_auth = miq_database.ansible_admin_authentication
AnsibleTowerClient::Connection.new(
:base_url => URI::HTTP.build(:host => "localhost", :path => "/api/v1", :port => NGINX_HTTP_PORT).to_s,
:base_url => URI::HTTP.build(:host => "localhost", :path => "/api/v1", :port => HTTP_PORT).to_s,
:username => admin_auth.userid,
:password => admin_auth.password
)
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/embedded_ansible_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@
let(:extra_vars) do
{
:minimum_var_space => 0,
:nginx_http_port => described_class::NGINX_HTTP_PORT,
:nginx_https_port => described_class::NGINX_HTTPS_PORT
:http_port => described_class::HTTP_PORT,
:https_port => described_class::HTTPS_PORT
}.to_json
end

Expand Down

0 comments on commit 61dd5d0

Please sign in to comment.