ansible-powerplay 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.semver +1 -1
- data/ansible-powerplay.gemspec +3 -3
- data/lib/ansible-powerplay/cli.rb +5 -5
- data/lib/ansible-powerplay/powerplay.rb +11 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a59c6967f5d7e959a86e1b746b443fb03ec7031e
|
4
|
+
data.tar.gz: bd9a4431839188117f0f092c5f4bd8cb013b87c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7d17b9b006f13de8f541d813b1fad5d18be11763722927eb611015341092f79d5cdec96fc91160cdfd87cead6270448742e3a4a9070bbdce04724c113c2c134
|
7
|
+
data.tar.gz: e87aaf34027d707437a0ffd9ee94a486571f37e9ff549c535e594eebe9346a7ae7f0a3fe1607ec629b7346a58bb03a12fe8704b365eeec747799ce0556daa37a
|
data/.semver
CHANGED
data/ansible-powerplay.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: ansible-powerplay 0.0.
|
5
|
+
# stub: ansible-powerplay 0.0.6 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "ansible-powerplay"
|
9
|
-
s.version = "0.0.
|
9
|
+
s.version = "0.0.6"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Fred Mitchell"]
|
14
|
-
s.date = "2016-02-
|
14
|
+
s.date = "2016-02-18"
|
15
15
|
s.description = "Ansible Powerplay, by way of its DSL, allows you to\n specify your Ansible playbooks and their vars, and common\n vars to all, so that you can run your\n indeoendent playbooks in full parallel."
|
16
16
|
s.email = "fred.mitchell@gmx.de"
|
17
17
|
s.executables = ["powerplay"]
|
@@ -13,12 +13,12 @@ module Powerplay
|
|
13
13
|
script, as specified, are run in parallel
|
14
14
|
by default.
|
15
15
|
LONGDESC
|
16
|
-
option :tmux,
|
17
|
-
option :play,
|
18
|
-
option :group,
|
16
|
+
option :tmux, type: :numeric, lazy_default: 0, aliases: '-m', banner: "[WINDOWNUMBERopt] Send output to all tmux panes in the current window, or the numeric window specified."
|
17
|
+
option :play, type: :string, aliases: '-p', banner: "[NAME|all] Which playbook shelf", required: true
|
18
|
+
option :group, type: :string, aliases: '-g', banner: "[NAME|all] Which group to execute", default: "all"
|
19
19
|
option :congroups, type: :boolean, aliases: '-c', banner: "Run the groups themselves concurrently"
|
20
|
-
option :book,
|
21
|
-
option :dryrun,
|
20
|
+
option :book, type: :string, aliases: '-b', banner: "[NAME|all] Which book to execute", default: "all"
|
21
|
+
option :dryrun, type: :boolean, aliases: '-u', banner: "Dry run, do not actually execute."
|
22
22
|
def play(script)
|
23
23
|
DSL::_global[:options] = options
|
24
24
|
puts "script %s " % [script] if DSL::_global[:options][:verbose] >= 1
|
@@ -10,14 +10,22 @@ module Powerplay
|
|
10
10
|
end
|
11
11
|
|
12
12
|
module Tmux
|
13
|
-
#
|
13
|
+
# Get a list of the ptys
|
14
|
+
# Note that this code is a bit innefficient, but will only be
|
15
|
+
# executed once in the loop.
|
14
16
|
def self.pane_ptys
|
15
|
-
@
|
16
|
-
|
17
|
+
@window = if Play::clopts.nil? or Play::clopts[:tmux] == 0
|
18
|
+
''
|
19
|
+
else
|
20
|
+
" -t #{Play::clopts[:tmux]} "
|
21
|
+
end
|
22
|
+
@ptys ||= if Play::clopts.nil? or Play::clopts[:tmux]
|
23
|
+
%x[tmux list-panes #{@window} -F '\#{pane_tty},']
|
17
24
|
.inspect
|
18
25
|
.chop
|
19
26
|
.split(",")
|
20
27
|
.map{ |s| s.strip.sub(/\\n|\"/, '') }
|
28
|
+
.reject{ |pty| pty == %x(tty).chop }
|
21
29
|
else
|
22
30
|
[Play::DEFOUT]
|
23
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ansible-powerplay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fred Mitchell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|