Skip to content

Commit

Permalink
Splitting ansible_roles_check_mode parameter check_mode and new Job T…
Browse files Browse the repository at this point in the history
…emplate job_check_mode into separate variables.
  • Loading branch information
bnerickson committed Oct 23, 2024
1 parent 395df3b commit 3e01dae
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions app/models/foreman_ansible/ansible_provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def proxy_command_options(template_invocation, host)
template_invocation.template
),
:name => host.name,
:check_mode => check_mode?(template_invocation.template, host),
:check_mode => host.host_param('ansible_roles_check_mode'),
:job_check_mode => template.ansible_check_mode,
:cleanup_working_dirs => cleanup_working_dirs?(host)
)
end
Expand Down Expand Up @@ -125,10 +126,6 @@ def ansible_command?(template)
template.remote_execution_features.
where(:label => 'ansible_run_host').empty? && !template.ansible_callback_enabled
end

def check_mode?(template, host)
host.host_param('ansible_roles_check_mode') || template.ansible_check_mode
end
end
end
end
Expand Down

0 comments on commit 3e01dae

Please sign in to comment.