Skip to content

Commit

Permalink
Fixes #28042 - remove ansible-playbook option (theforeman#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
ezr-ondrej authored and ares committed Oct 14, 2019
1 parent cdee15e commit 290a061
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/models/foreman_ansible/ansible_provider.rb
Expand Up @@ -59,7 +59,7 @@ def supports_effective_user?
end

def proxy_operation_name
Setting::Ansible[:ansible_implementation]
'ansible-runner'
end

private
Expand Down
10 changes: 0 additions & 10 deletions app/models/setting/ansible.rb
Expand Up @@ -80,16 +80,6 @@ def load_defaults
false,
format(N_('%{cfgmgmt} out of sync disabled'),
:cfgmgmt => 'Ansible')
),
set(
'ansible_implementation',
N_('Foreman will run Ansible playbooks using this implementation'),
'ansible-runner',
N_('Implementation for running Ansible'),
nil,
:collection => lambda do
Hash[%w[ansible-runner ansible-playbook].map { |x| [x, x] }]
end
)
].compact.each do |s|
create(s.update(:category => 'Setting::Ansible'))
Expand Down
@@ -0,0 +1,5 @@
class RemoveAnsibleImplementationSetting < ActiveRecord::Migration[5.2]
def up
Setting.where(:name => 'ansible_implementation').destroy_all
end
end

0 comments on commit 290a061

Please sign in to comment.