Module: Appforce::Spawn::ClassMethods
- Defined in:
- lib/appforce/spawn.rb
Overview
Define methods to extend
Instance Method Summary collapse
- #ansible_ping(*args) ⇒ Object
- #check_dependencies(*args) ⇒ Object
- #clients ⇒ Object
- #config ⇒ Object
- #display_ansible_command(*args) ⇒ Object
- #display_ansible_ping_command(*args) ⇒ Object
- #dump_example_config(*args) ⇒ Object
- #footer ⇒ Object
- #generate(*args) ⇒ Object
- #get_active_users(*args) ⇒ Object
- #get_all_host_data(*args) ⇒ Object
- #get_clients ⇒ Object
- #get_hosts(*args) ⇒ Object
- #get_inactive_users(*args) ⇒ Object
- #get_vars(*args) ⇒ Object
- #header(input) ⇒ Object
- #latest_version(*args) ⇒ Object
- #load_config(*args) ⇒ Object
- #logger ⇒ Object
- #logger=(logger) ⇒ Object
- #ping_api ⇒ Object
- #ping_host ⇒ Object
- #spawn(*args) ⇒ Object
- #ssh_to_host(*args) ⇒ Object
Instance Method Details
#ansible_ping(*args) ⇒ Object
98 99 100 101 |
# File 'lib/appforce/spawn.rb', line 98 def ansible_ping(*args) Appforce::Spawn::Runner.can_run? Appforce::Spawn::Runner.ansible_ping end |
#check_dependencies(*args) ⇒ Object
124 125 126 127 |
# File 'lib/appforce/spawn.rb', line 124 def check_dependencies(*args) Appforce::Spawn::Runner.check_dependencies logger.info "[#{self.name}##{__method__.to_s}] All required Ansible checks passed." end |
#clients ⇒ Object
56 57 58 |
# File 'lib/appforce/spawn.rb', line 56 def clients Appforce::Spawn::Api::Call.list_clients end |
#config ⇒ Object
52 53 54 |
# File 'lib/appforce/spawn.rb', line 52 def config Appforce::Config.config end |
#display_ansible_command(*args) ⇒ Object
93 94 95 96 |
# File 'lib/appforce/spawn.rb', line 93 def display_ansible_command(*args) Appforce::Spawn::Runner.can_run? Appforce::Spawn::Runner.display_ansible_command end |
#display_ansible_ping_command(*args) ⇒ Object
103 104 105 106 |
# File 'lib/appforce/spawn.rb', line 103 def display_ansible_ping_command(*args) Appforce::Spawn::Runner.can_run? Appforce::Spawn::Runner.display_ansible_ping_command end |
#dump_example_config(*args) ⇒ Object
108 109 110 |
# File 'lib/appforce/spawn.rb', line 108 def dump_example_config(*args) Appforce::Config.dump_example_config end |
#footer ⇒ Object
36 37 38 |
# File 'lib/appforce/spawn.rb', line 36 def Appforce::Logger. end |
#generate(*args) ⇒ Object
80 81 82 83 84 85 86 |
# File 'lib/appforce/spawn.rb', line 80 def generate(*args) logger.info "[#{self.name}##{__method__.to_s}] Template Generation Starting" Appforce::Spawn::Template.create_dirs(*args) Appforce::Spawn::Template.copy_template(*args) Appforce::Spawn::Template.download_files(*args) logger.info "[#{self.name}##{__method__.to_s}] Template Generation Complete" end |
#get_active_users(*args) ⇒ Object
68 69 70 |
# File 'lib/appforce/spawn.rb', line 68 def get_active_users(*args) Appforce::Spawn::Api::Call.get_active_users(*args) end |
#get_all_host_data(*args) ⇒ Object
112 113 114 |
# File 'lib/appforce/spawn.rb', line 112 def get_all_host_data(*args) Appforce::Spawn::Api::Call.get_all_host_data(*args) end |
#get_clients ⇒ Object
60 61 62 |
# File 'lib/appforce/spawn.rb', line 60 def get_clients Appforce::Spawn::Api::Call.get_clients end |
#get_hosts(*args) ⇒ Object
64 65 66 |
# File 'lib/appforce/spawn.rb', line 64 def get_hosts(*args) Appforce::Spawn::Api::Call.get_hosts(*args) end |
#get_inactive_users(*args) ⇒ Object
72 73 74 |
# File 'lib/appforce/spawn.rb', line 72 def get_inactive_users(*args) Appforce::Spawn::Api::Call.get_inactive_users(*args) end |
#get_vars(*args) ⇒ Object
76 77 78 |
# File 'lib/appforce/spawn.rb', line 76 def get_vars(*args) Appforce::Spawn::Api::Call.get_vars(*args) end |
#header(input) ⇒ Object
32 33 34 |
# File 'lib/appforce/spawn.rb', line 32 def header(input) Appforce::Logger.header(input) end |
#latest_version(*args) ⇒ Object
120 121 122 |
# File 'lib/appforce/spawn.rb', line 120 def latest_version(*args) Appforce::Spawn::Api::Call.latest_version end |
#load_config(*args) ⇒ Object
48 49 50 |
# File 'lib/appforce/spawn.rb', line 48 def load_config(*args) Appforce::Config.load_config(*args) end |
#logger ⇒ Object
24 25 26 |
# File 'lib/appforce/spawn.rb', line 24 def logger Appforce::Logger.logger end |
#logger=(logger) ⇒ Object
28 29 30 |
# File 'lib/appforce/spawn.rb', line 28 def logger=(logger) Appforce::Logger.logger = logger end |
#ping_api ⇒ Object
44 45 46 |
# File 'lib/appforce/spawn.rb', line 44 def ping_api Appforce::Spawn::Api::Call.ping end |
#ping_host ⇒ Object
40 41 42 |
# File 'lib/appforce/spawn.rb', line 40 def ping_host HTTParty.get("#{config.api_host}/ping") end |
#spawn(*args) ⇒ Object
88 89 90 91 |
# File 'lib/appforce/spawn.rb', line 88 def spawn(*args) Appforce::Spawn::Runner.can_run? Appforce::Spawn::Runner.run_playbook end |
#ssh_to_host(*args) ⇒ Object
116 117 118 |
# File 'lib/appforce/spawn.rb', line 116 def ssh_to_host(*args) Appforce::Spawn::Api::Call.ssh_to_host(*args) end |