Sha256: 21b4c09a00d8eb8db17ee22ec9bb3a548ede1af041f30fbd719d59597d838c34
Contents?: true
Size: 1.06 KB
Versions: 20
Compression:
Stored size: 1.06 KB
Contents
class Subspace::Commands::Bootstrap < Subspace::Commands::Base PASS_THROUGH_PARAMS = ["private-key"] def initialize(args, options) @host_spec = args.first @options = options @ask_pass = options.password @yum = options.yum run end def run # ansible atlanta -m copy -a "src=/etc/hosts dest=/tmp/hosts" install_python ensure_ssh_dir end private def ensure_ssh_dir cmd = ["ansible", @host_spec, "-m", "file", "-a", "path=/home/{{ansible_ssh_user}}/.ssh state=directory mode=0700", "-vvvv" ] cmd = cmd | pass_through_params bootstrap_command cmd end def install_python update_ansible_cfg cmd = ["ansible", @host_spec, "-m", "raw", "-a", "test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)", "--become", "-vvvv" ] cmd = cmd | pass_through_params bootstrap_command cmd end def bootstrap_command(cmd) if @ask_pass cmd.push("--ask-pass") end ansible_command *cmd end end
Version data entries
20 entries across 20 versions & 1 rubygems