app/models/setting/ansible.rb in foreman_ansible-2.3.6 vs app/models/setting/ansible.rb in foreman_ansible-3.0.0
- old
+ new
@@ -65,20 +65,10 @@
'until it is ready after a reboot.'),
'360',
N_('Post-provision timeout')
),
set(
- 'top_level_ansible_vars',
- N_('Whether to put Ansible parameters in the "hostvars" '\
- 'top-level key of the inventory. By default it is true, so '\
- 'that Host Parameters can be used directly in the '\
- 'playbooks. When false, Host Parameters can only be accessed '\
- 'through foreman_params["host_parameter"] in the playbooks.'),
- true,
- N_('Top level Ansible variables')
- ),
- set(
'ansible_interval',
N_('Timeout (in minutes) when hosts should have reported.'),
'30',
N_('Ansible report timeout')
),
@@ -88,9 +78,19 @@
' sync for %{cfgmgmt} after report does not arrive within'\
' configured interval'), :cfgmgmt => 'Ansible'),
false,
format(N_('%{cfgmgmt} out of sync disabled'),
:cfgmgmt => 'Ansible')
+ ),
+ set(
+ 'ansible_implementation',
+ N_('Foreman will run Ansible playbooks using this implementation'),
+ 'ansible-playbook',
+ N_('Implementation for running Ansible'),
+ nil,
+ :collection => lambda do
+ Hash[%w[ansible-playbook ansible-runner].map { |x| [x, x] }]
+ end
)
].compact.each do |s|
create(s.update(:category => 'Setting::Ansible'))
end
end