Class: ForemanAnsibleCore::CommandCreator
- Inherits:
-
Object
- Object
- ForemanAnsibleCore::CommandCreator
- Defined in:
- lib/foreman_ansible_core/runner/command_creator.rb
Overview
Creates the actual command to be passed to foreman_tasks_core to run
Instance Method Summary collapse
- #command ⇒ Object
-
#initialize(inventory_file, playbook_file, options = {}) ⇒ CommandCreator
constructor
A new instance of CommandCreator.
Constructor Details
#initialize(inventory_file, playbook_file, options = {}) ⇒ CommandCreator
Returns a new instance of CommandCreator.
6 7 8 9 10 11 |
# File 'lib/foreman_ansible_core/runner/command_creator.rb', line 6 def initialize(inventory_file, playbook_file, = {}) @options = @playbook_file = playbook_file @inventory_file = inventory_file command end |
Instance Method Details
#command ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/foreman_ansible_core/runner/command_creator.rb', line 13 def command parts = [environment_variables] parts << 'ansible-playbook' parts.concat() parts << @playbook_file parts end |