Skip to content

Commit

Permalink
Credential.manager_ref need to be an integer for Tower 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
lfu committed Nov 1, 2018
1 parent 7d7b570 commit eede4b7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def build_parameter_list(options)

%i(credential vault_credential cloud_credential network_credential).each do |credential|
cred_sym = "#{credential}_id".to_sym
params[credential] = Authentication.find(options[cred_sym]).manager_ref if options[cred_sym].present?
params[credential] = Authentication.find(options[cred_sym]).native_ref if options[cred_sym].present?
end

params.compact
Expand Down
2 changes: 1 addition & 1 deletion app/models/service_ansible_playbook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def save_job_options(action, overrides)
%i(credential vault_credential).each do |cred|
cred_sym = "#{cred}_id".to_sym
credential_id = job_options.delete(cred_sym)
job_options[cred] = Authentication.find(credential_id).manager_ref if credential_id.present?
job_options[cred] = Authentication.find(credential_id).native_ref if credential_id.present?
end

hosts = job_options[:hosts]
Expand Down
2 changes: 1 addition & 1 deletion app/models/service_template_ansible_playbook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def self.build_parameter_list(name, description, info)

%i(credential vault_credential cloud_credential network_credential).each do |credential|
cred_sym = "#{credential}_id".to_sym
params[credential] = Authentication.find(info[cred_sym]).manager_ref if info[cred_sym]
params[credential] = Authentication.find(info[cred_sym]).native_ref if info[cred_sym]
end

[tower, params.compact]
Expand Down

0 comments on commit eede4b7

Please sign in to comment.