Class: Subspace::Commands::Bootstrap
- Defined in:
- lib/subspace/commands/bootstrap.rb
Instance Method Summary collapse
-
#initialize(args, options) ⇒ Bootstrap
constructor
A new instance of Bootstrap.
- #run ⇒ Object
Methods inherited from Base
#confirm_overwrite, #copy, #dest_dir, #gem_path, #inventory, #pass_through_params, #playbook_dir, #project_name, #project_path, #require_configuration, #set_subspace_version, #template, #template!, #template_dir
Methods included from Ansible
#ansible_command, #ansible_playbook
Constructor Details
#initialize(args, options) ⇒ Bootstrap
Returns a new instance of Bootstrap.
3 4 5 6 7 8 9 |
# File 'lib/subspace/commands/bootstrap.rb', line 3 def initialize(args, ) @host_spec = args.first @options = @ask_pass = .password @yum = .yum run end |
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/subspace/commands/bootstrap.rb', line 11 def run # ansible atlanta -m copy -a "src=/etc/hosts dest=/tmp/hosts" hosts = inventory.find_hosts!(@host_spec) update_ansible_cfg hosts.each do |host| say "Bootstapping #{host.vars["hostname"]}..." learn_host(host) install_python(host) end end |