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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 88303d0e049d649b8d969e872a412cffc9d96162
4
- data.tar.gz: ffc30cbff29524a0a3abdf69d8362b02e1d05981
3
+ metadata.gz: a59c6967f5d7e959a86e1b746b443fb03ec7031e
4
+ data.tar.gz: bd9a4431839188117f0f092c5f4bd8cb013b87c4
5
5
  SHA512:
6
- metadata.gz: 31e69ea4973bb82ef4e4e6318ca7eb55aea56b1905bda91ee4b88bcd2df385b2ebf46c67e92428f9461bac505528516bc567d34bf4d3550ee80f98701538893b
7
- data.tar.gz: 454af5e1e9112a5cdfddd017aa68598fbdef398091a726120f40bb7dca0cd225fe03e8b51449757c603e03fe3e828dbcaebf530dbb7f7acf3ee29f255e944baf
6
+ metadata.gz: f7d17b9b006f13de8f541d813b1fad5d18be11763722927eb611015341092f79d5cdec96fc91160cdfd87cead6270448742e3a4a9070bbdce04724c113c2c134
7
+ data.tar.gz: e87aaf34027d707437a0ffd9ee94a486571f37e9ff549c535e594eebe9346a7ae7f0a3fe1607ec629b7346a58bb03a12fe8704b365eeec747799ce0556daa37a
data/.semver CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 0
4
- :patch: 5
4
+ :patch: 6
5
5
  :special: ''
@@ -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 ruby lib
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.5"
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-17"
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, type: :boolean, aliases: '-m', banner: "send output to all tmux panes in the current window"
17
- option :play, type: :string, banner: "[NAME|all] Which playbook shelf", required: true
18
- option :group, type: :string, banner: "[NAME|all] Which group to execute", default: "all"
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, type: :string, banner: "[NAME|all] Which book to execute", default: "all"
21
- option :dryrun, type: :boolean, banner: "Dry run, do not actually execute."
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
- # get a list of the ptys
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
- @ptys ||= if Play::clopts[:tmux]
16
- %x[tmux list-panes -F '\#{pane_tty},']
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.5
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-17 00:00:00.000000000 Z
11
+ date: 2016-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor