ansible-powerplay 0.2.1 → 0.2.2

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: 69f3a4daf0204e14ee2ef52d7c6aac60b3d8d381
4
- data.tar.gz: 7c137de2f93e486edf904d3725a5c7df2d8678cb
3
+ metadata.gz: ce738895cb1c3dc925eaeddf3bec14662d73272f
4
+ data.tar.gz: 73ae04b19bbf0bfb1ad5cf4241d7530411023ffb
5
5
  SHA512:
6
- metadata.gz: 90c32a85c428d6ed98860b4ed0944c256bc9bcc0b34e8ac3ec6c40074cada8934b4e62b9dddb2504943978c6ab8b434b22a616c106f1cd15bedf1127ddfce7f1
7
- data.tar.gz: ad6a6e5bb2d66a78d5c3bd735f0a9f7f7a3599f2d2ee8b093d29bdd557b7a5a23a1d840c72e4919f1c1d3711d7d3233923025636355562f2207db305a2cf32d4
6
+ metadata.gz: 57850197c68fa7cd698b7a857ef9fcf2fca65f3096cc45ab0ddc73aab2e23335e63c1616584b002cb85db24697c23f2793e4ed8bca1f0fed2af1029a97e46289
7
+ data.tar.gz: 2c48c28cc41963e5cbd7bc93da2b823d04687d40692af95352a7700f618d3697ea48f89f6adba4c88462dd114b990c4b6769bc2bff3e307c1444dbc11c9ff268
data/.semver CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 2
4
- :patch: 1
4
+ :patch: 2
5
5
  :special: ''
data/Gemfile.lock CHANGED
@@ -7,7 +7,7 @@ GEM
7
7
  builder (3.2.2)
8
8
  byebug (8.2.2)
9
9
  coderay (1.1.1)
10
- concurrent-ruby (1.0.0)
10
+ concurrent-ruby (1.0.1)
11
11
  debug_inspector (0.0.2)
12
12
  descendants_tracker (0.0.4)
13
13
  thread_safe (~> 0.3, >= 0.3.1)
@@ -17,7 +17,7 @@ GEM
17
17
  multipart-post (>= 1.2, < 3)
18
18
  ffi (1.9.10)
19
19
  formatador (0.2.5)
20
- git (1.2.9.1)
20
+ git (1.3.0)
21
21
  github_api (0.13.1)
22
22
  addressable (~> 2.4.0)
23
23
  descendants_tracker (~> 0.0.4)
data/RELEASE_NOTES.org CHANGED
@@ -9,6 +9,7 @@
9
9
  ** Release Notes
10
10
  | Release | Feature / Bug | Description | Date |
11
11
  |---------+----------------------------------+------------------------------------------------------------------------------------+------------|
12
+ | v0.2.2 | --tags, --skip-tags | Ansible tag support | 2016-03-07 |
12
13
  | v0.2.1 | --extra-vars | A way of passing extra vars to the Ansible playbooks. Please see the documentation | 2016-03-01 |
13
14
  | v0.2.0 | powerplay play (behavior change) | If script is not given, now defaults to 'stack.play' in the current directory. | 2016-02-29 |
14
15
  | v0.1.3 | --tmux | Better handling at distributing the panes. | 2016-02-26 |
@@ -21,20 +22,23 @@
21
22
  | | --book | You can select an individual playbook to run | |
22
23
  | | --group | You can select an individual group to run | |
23
24
 
25
+
24
26
  ** Known Outstanding Issues
25
27
  Bugs and missing features that needs to be addressed. As they are,
26
28
  we'll remove them from this list.
27
29
  | Date | Issue | Description |
28
30
  |------------+----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------|
31
+ | 2016-03-03 | Status dump out of order | Currently a bit out of order due to the fact that the output are being run in different threads and so the text is being printed nondeterministically. |
29
32
  | 2016-02-20 | Platforms other than Linux | We need to test on Mac OSX and Windows. Should work fine on Macs. I do not plan to support Windows in general, but may accept pull requests to that end. |
30
33
 
31
34
  ** Wish List
32
35
  Well, we can always wish upon a star...
33
36
  | Date | Wish | Description |
34
37
  |------------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
35
- | 2016-02-29 | Configuration file | Add a (presumably yaml format) configuration file in a few key locations. |
36
- | | Name Completion | Shell integration with name completion features of bash. |
37
38
  | 2016-02-20 | Integration with Jenkins | I have no idea what form this will take |
38
39
  | | Curses integration | Basically, the tmux integration is used because it was quick to do. But what I really want to do is full Curses support, similar with what you see with htop and other tools. |
39
40
  | 2016-02-26 | Better and Error handling | When there's a failure in the underlying Ansible playbook, we want to handle that better in Powerplay. This would be a part of the Curses upgrade to come later. |
41
+ | 2016-02-29 | Configuration file | Add a (presumably yaml format) configuration file in a few key locations. |
42
+ | | Name Completion | Shell integration with name completion features of bash. |
43
+ | 2016-03-03 | DSL subgroup | We need to subgroup books within a group to make it easier to launch them specifically. |
40
44
  | | | |
@@ -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.2.1 ruby lib
5
+ # stub: ansible-powerplay 0.2.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "ansible-powerplay"
9
- s.version = "0.2.1"
9
+ s.version = "0.2.2"
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-03-01"
14
+ s.date = "2016-03-07"
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"]
@@ -19,7 +19,7 @@ module Powerplay
19
19
  LONGDESC
20
20
  option :tmux, type: :numeric, aliases: '-m', banner: "[WINDOWNUMBERopt]", lazy_default: 0,
21
21
  desc: ' Send output to all tmux panes in the current window, or the numeric window specified.'
22
- option :play, type: :array, aliases: ['-p', '--play', '--power'], banner: "[NAME[ NAME2...]|all]", required: true,
22
+ option :play, type: :array, aliases: ['-p', '--power'], banner: "[NAME[ NAME2...]|all]", required: true,
23
23
  desc: 'Which PowerPlay playbooks (as opposed to Ansible playbooks) to specifically execute.'
24
24
  option :group, type: :array, aliases: '-g', banner: "[NAME[ NAME2...]|all]", default: [:all],
25
25
  desc: ' Which groups to execute.'
@@ -30,6 +30,12 @@ module Powerplay
30
30
  option :extra, type: :array, aliases: ['-x', '--extra-vars'],
31
31
  banner: %(<BOOKNAME|all>:"key1a=value1a key2a=value2a... " [BOOKNAME2:"key1b=value1b key2b=value2b... "]), default: [],
32
32
  desc: 'Pass custom parameters directly to playbooks. You may either pass parameters to all playbooks or specific ones.'
33
+ option :tags, type: :array, aliases: '-t',
34
+ banner: %(<TAG1>[ TAG2 TAG3...]),
35
+ desc: "Ansible tags to only run - mutually exclusive with --skip-tags"
36
+ option :sktags, type: :array, aliases: ['--skip-tags', '-T'],
37
+ banner: %(<TAG1>[ TAG2 TAG3...]),
38
+ desc: "Ansible tags to skip - mutually exclusive with --tags"
33
39
  def play(script = 'stack.play')
34
40
  DSL::_global[:options] = massage options
35
41
  puts "script %s " % [script] if DSL::_global[:options][:verbose] >= 1
@@ -47,6 +53,8 @@ module Powerplay
47
53
  def massage(options)
48
54
  opt = Thor::CoreExt::HashWithIndifferentAccess.new options
49
55
  opt[:extra] = Thor::CoreExt::HashWithIndifferentAccess.new opt[:extra].map{ |s| s.split(':', 2)}.to_h
56
+ opt[:tags] = opt[:tags].join(',') unless opt[:tags].nil?
57
+ opt[:sktags] = opt[:sktags].join(',') unless opt[:sktags].nil?
50
58
  opt
51
59
  end
52
60
  end
@@ -71,6 +71,15 @@ module Powerplay
71
71
  def self.run_book(book, bucher, book_threads, errors)
72
72
  dryrun = Play::clopts[:dryrun]
73
73
  extra = Play::clopts[:extra]
74
+ tags = Play::clopts[:tags]
75
+ sktags = Play::clopts[:sktags]
76
+ tagstr = ''
77
+ if tags and sktags
78
+ puts "Cannot use both --tags (#{tags}) and --skip-tags (#{sktags})"
79
+ exit 5
80
+ end
81
+ tagstr += %( --tags "#{tags}" ) unless tags.nil?
82
+ tagstr += %( --skip-tags "#{sktags}" ) unless sktags.nil?
74
83
  tty ||= Tmux.grab_a_tty
75
84
  puts " tty == #{tty} (#{Tmux.pane_ttys.last})" unless DSL::_verbosity < 2
76
85
  if bucher.first == :all or bucher.member?(book.type)
@@ -81,7 +90,7 @@ module Powerplay
81
90
  ''
82
91
  end
83
92
  xxv = [extra[book.type], extra[:all]].compact.join(' ')
84
- apcmd = %|#{PLAYBOOK} #{OPTS} #{inv} #{book.config[:playbook_directory].first}/#{book.yaml} --extra-vars "#{book.aparams} #{xxv}" >#{tty}|
93
+ apcmd = %|#{PLAYBOOK} #{OPTS} #{inv} #{book.config[:playbook_directory].first}/#{book.yaml} #{tagstr} --extra-vars "#{book.aparams} #{xxv}" >#{tty}|
85
94
  book_threads << Thread.new {
86
95
  std, status = Open3.capture2e apcmd
87
96
  errors << [book.yaml, apcmd, std] unless status.success?
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.2.1
4
+ version: 0.2.2
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-03-01 00:00:00.000000000 Z
11
+ date: 2016-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor