diff --git a/app/models/foreman_ansible/ansible_provider.rb b/app/models/foreman_ansible/ansible_provider.rb index d725a95f..6259d05c 100644 --- a/app/models/foreman_ansible/ansible_provider.rb +++ b/app/models/foreman_ansible/ansible_provider.rb @@ -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 @@ -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