Skip to content

Commit

Permalink
Ensure template_invocation is not nil
Browse files Browse the repository at this point in the history
  • Loading branch information
OttaviaB authored and stejskalleos committed Feb 20, 2024
1 parent ee84224 commit 1bf3aa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/foreman_ansible/inventory_creator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def ansible_extra_options(host)

def remote_execution_options(host)
params = {
'ansible_user' => @template_invocation.job_invocation&.ssh_user || host_setting(host, 'remote_execution_ssh_user'),
'ansible_user' => @template_invocation&.job_invocation&.ssh_user || host_setting(host, 'remote_execution_ssh_user'),
'ansible_become_method' => host_setting(host, 'remote_execution_effective_user_method'),
'ansible_ssh_private_key_file' => ansible_ssh_private_key(host),
'ansible_port' => host_setting(host, 'remote_execution_ssh_port'),
Expand Down

0 comments on commit 1bf3aa8

Please sign in to comment.