Class: AnsibleTowerClient::SystemJobTemplate

Inherits:
BaseModel show all
Defined in:
lib/ansible_tower_client/base_models/system_job_template.rb

Instance Attribute Summary

Attributes inherited from BaseModel

#api, #raw_hash

Instance Method Summary collapse

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(extra_vars) ⇒ Object



3
4
5
6
# File 'lib/ansible_tower_client/base_models/system_job_template.rb', line 3

def launch(extra_vars)
  response = JSON.parse(api.post("#{url}launch/", "extra_vars" => extra_vars).body)
  api.system_jobs.find(response["system_job"])
end

#schedulesObject



8
9
10
# File 'lib/ansible_tower_client/base_models/system_job_template.rb', line 8

def schedules
  Collection.new(api).find_all_by_url(related["schedules"])
end