Class: AnsibleTowerClient::JobTemplateV2
- Inherits:
-
JobTemplate
- Object
- HashModel
- BaseModel
- JobTemplate
- AnsibleTowerClient::JobTemplateV2
- Defined in:
- lib/ansible_tower_client/v2/job_template_v2.rb
Instance Attribute Summary
Attributes inherited from BaseModel
Instance Method Summary collapse
Methods inherited from JobTemplate
#extra_vars_hash, #override_raw_attributes, #survey_spec, #survey_spec_hash
Methods inherited from BaseModel
base_class, create, create!, #destroy, #destroy!, endpoint, #hashify, #initialize, #override_raw_attributes, #save, #save!, #update_attributes, #update_attributes!
Methods inherited from HashModel
#==, #[], #initialize, #inspect, #to_h, #to_json
Constructor Details
This class inherits a constructor from AnsibleTowerClient::BaseModel
Instance Method Details
#launch(options = {}) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/ansible_tower_client/v2/job_template_v2.rb', line 3 def launch( = {}) launch_url = "#{url}launch/" = .dup new_limit = .delete(:limit) || .delete('limit') response = with_temporary_changes(new_limit) do api.post(launch_url, ).body end job = JSON.parse(response) api.jobs.find(job['job']) end |