Class: ForemanAnsible::AnsibleProvider
- Inherits:
-
RemoteExecutionProvider
- Object
- RemoteExecutionProvider
- ForemanAnsible::AnsibleProvider
- Defined in:
- app/models/foreman_ansible/ansible_provider.rb
Overview
Provider for RemoteExecution that allows to run Ansible playbooks. Read the source of other RemoteExecution providers for more.
Class Method Summary collapse
- .humanized_name ⇒ Object
- .proxy_command_options(template_invocation, host) ⇒ Object
- .proxy_operation_name ⇒ Object
- .ssh_key_passphrase(host) ⇒ Object
- .ssh_password(host) ⇒ Object
- .supports_effective_user? ⇒ Boolean
Class Method Details
.humanized_name ⇒ Object
17 18 19 |
# File 'app/models/foreman_ansible/ansible_provider.rb', line 17 def humanized_name 'Ansible' end |
.proxy_command_options(template_invocation, host) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'app/models/foreman_ansible/ansible_provider.rb', line 21 def (template_invocation, host) super(template_invocation, host).merge( 'ansible_inventory' => ::ForemanAnsible::InventoryCreator.new( [host], template_invocation ).to_hash.to_json, :remote_execution_command => ansible_command?( template_invocation.template ), :name => host.name ) end |
.proxy_operation_name ⇒ Object
37 38 39 |
# File 'app/models/foreman_ansible/ansible_provider.rb', line 37 def proxy_operation_name Setting::Ansible[:ansible_implementation] end |
.ssh_key_passphrase(host) ⇒ Object
13 14 15 |
# File 'app/models/foreman_ansible/ansible_provider.rb', line 13 def ssh_key_passphrase(host) host_setting(host, :remote_execution_ssh_key_passphrase) end |
.ssh_password(host) ⇒ Object
9 10 11 |
# File 'app/models/foreman_ansible/ansible_provider.rb', line 9 def ssh_password(host) host_setting(host, :remote_execution_ssh_password) end |
.supports_effective_user? ⇒ Boolean
33 34 35 |
# File 'app/models/foreman_ansible/ansible_provider.rb', line 33 def supports_effective_user? true end |