ansible-powerplay 0.1.2 → 0.1.3
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/RELEASE_NOTES.org +11 -10
- data/ansible-powerplay.gemspec +3 -3
- data/lib/ansible-powerplay/cli.rb +1 -0
- data/lib/ansible-powerplay/powerplay.rb +17 -4
- data/lib/ansible-powerplay.rb +1 -0
- 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: 26f7d6031374230d79075a468cb9eb529c46335e
|
4
|
+
data.tar.gz: fe9100646231bd39f16d3f3d3da87a717554131e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef1b0c04accd7262a739e2a1401e1b9f42ef4142839eb79b66a8ae24b78b79892df46a61616b52280d34c06414eedb99dbe59289709c7d7489b1a7c5152923e9
|
7
|
+
data.tar.gz: 73258c610b79f068aead6586b9ba3b2ae47846c944f1fc5730a0944ee1a72e07f29c50c928d38eee3be713fe843acc8a7996ac9da64b925417235dea00379830
|
data/.semver
CHANGED
data/RELEASE_NOTES.org
CHANGED
@@ -7,16 +7,17 @@
|
|
7
7
|
major number. Of course, you can read all about it here.
|
8
8
|
|
9
9
|
** Release Notes
|
10
|
-
|
|
11
|
-
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
| Release | Feature / Bug | Description | Date |
|
11
|
+
|---------+---------------------------------+----------------------------------------------------------------------------+------------|
|
12
|
+
| v0.1.3 | --tmux | Better handling at distributing the panes. | 2016-02-26 |
|
13
|
+
| v0.1.2 | --tmux. --no-tmux | Default output now goes to current tty | 2016-02-23 |
|
14
|
+
| v0.1.1 | --book, --group, --play | Minor bug with the array handling | 2016-02-22 |
|
15
|
+
| v0.1.0 | --book, --group, --play | Now each can take multiple specifications | 2016-02-22 |
|
16
|
+
| v0.0.8 | Creation of these Release Notes | About bloody time. The prior releases were all mostly bug fixes, and so... | 2016-02-20 |
|
17
|
+
| | --tmux | Now you can optionally specify the window number | |
|
18
|
+
| | --tmux | Now checks to ensure it does not dump to its own pane | |
|
19
|
+
| | --book | You can select an individual playbook to run | |
|
20
|
+
| | --group | You can select an individual group to run | |
|
20
21
|
|
21
22
|
** Known Outstanding Issues
|
22
23
|
Bugs and missing features that needs to be addressed. As they are,
|
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.1.
|
5
|
+
# stub: ansible-powerplay 0.1.3 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "ansible-powerplay"
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.3"
|
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-26"
|
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"]
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
require 'ansible-powerplay'
|
3
3
|
|
4
|
+
CRITICAL = Mutex.new
|
5
|
+
|
4
6
|
module Powerplay
|
5
7
|
module Play
|
6
8
|
def self.clopts
|
@@ -16,7 +18,7 @@ module Powerplay
|
|
16
18
|
# Get a list of the ptys
|
17
19
|
# Note that this code is a bit innefficient, but will only be
|
18
20
|
# executed once in the loop.
|
19
|
-
def self.
|
21
|
+
def self.pane_ttys
|
20
22
|
@window = if Play::clopts.nil? or Play::clopts[:tmux] == 0
|
21
23
|
''
|
22
24
|
else
|
@@ -34,6 +36,17 @@ module Powerplay
|
|
34
36
|
[current_tty]
|
35
37
|
end
|
36
38
|
end
|
39
|
+
|
40
|
+
# thread-safe way to grab a new tty
|
41
|
+
def self.grab_a_tty
|
42
|
+
tty = nil
|
43
|
+
CRITICAL.synchronize {
|
44
|
+
@@tty_count ||= -1
|
45
|
+
@@tty_count = (@@tty_count+1) % pane_ttys.size
|
46
|
+
tty = pane_ttys[@@tty_count]
|
47
|
+
}
|
48
|
+
tty
|
49
|
+
end
|
37
50
|
end
|
38
51
|
|
39
52
|
module Ansible
|
@@ -68,9 +81,9 @@ module Powerplay
|
|
68
81
|
puts " GROUP #{group.type} (book=#{bucher}, cg=#{congroups}) -->"
|
69
82
|
thrbooks = []
|
70
83
|
errors = []
|
71
|
-
group.books.
|
72
|
-
tty ||= Tmux.
|
73
|
-
puts " tty == #{tty} (#{Tmux.
|
84
|
+
group.books.each do | book |
|
85
|
+
tty ||= Tmux.grab_a_tty
|
86
|
+
puts " tty == #{tty} (#{Tmux.pane_ttys.last})" unless DSL::_verbosity < 2
|
74
87
|
if bucher.first == :all or bucher.member?(book.type)
|
75
88
|
puts " BOOK #{book.type}"
|
76
89
|
inv = if book.config.member? :inventory
|
data/lib/ansible-powerplay.rb
CHANGED
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.1.
|
4
|
+
version: 0.1.3
|
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-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|