Sha256: 6e9244928abed8b47f171ad28261126915a44ecaf2114af53ad2f54114475bfa
Contents?: true
Size: 1002 Bytes
Versions: 10
Compression:
Stored size: 1002 Bytes
Contents
module Subspace module Commands module Ansible def ansible_playbook(*args) args.push "--diff" ansible_command("ansible-playbook", *args) end def ansible_command(command, *args) update_ansible_cfg retval = false Dir.chdir "config/subspace" do say ">> Running #{command} #{args.join(' ')}" retval = system(command, *args, out: $stdout, err: $stderr) say "<< Done" end retval end private def update_ansible_cfg if ENV["DISABLE_MITOGEN"] puts "Mitogen explicitly disabled. Skipping detection. " elsif `pip show mitogen 2>&1` =~ /^Location: (.*?)$/m @mitogen_path = $1 puts "πππ Mitogen found at #{@mitogen_path}. WARP 9!....ENGAGE!π" else puts "Mitogen not detected. Ansible will be slow. Run `pip install mitogen` to fix." end template! "ansible.cfg" end end end end
Version data entries
10 entries across 10 versions & 1 rubygems