rbbt-util 5.31.1 → 5.31.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
  SHA256:
3
- metadata.gz: 61b346a2806a9f5c6f32dd2e972386ad2ebd5d748b4d71ac89fdeabc0250567b
4
- data.tar.gz: faa0e2b8eee1eb1271406f16bf8b030ee4ecd3d83e6dfce205a5129e6676e2c9
3
+ metadata.gz: 79f93b401b11a1f53f815a674bf7f9071c4645cedcbda110e33dc5f1be0fbd6b
4
+ data.tar.gz: 12f192532f938b13d26c4f718191065074b153e3ee36e9a10ef1ea7f9a5ec68a
5
5
  SHA512:
6
- metadata.gz: 57f76043890f5ad9ecdf7b397f7803d59556bc39fe8110fd719db68192cda82542ccf072899f37f23fd497a03fe79b9d1119146c268e7571843dee9a35eeb506
7
- data.tar.gz: 8b4b959e19804a206abb1a080d81866aa73388eee85d1c031021ed79e239df570b055a3f9d007fbe406eb372edd76ade85a556bf9d38dca16011b326efbf8117
6
+ metadata.gz: 78fc66df4a864384229c3e8ed9ecbc882a6f34e2303b9b71d8eaf8ccf30eb0e0da7bb4d62a72695160b8f03dcff1763f62a2c7d935046a3ac20f003114f51c75
7
+ data.tar.gz: 9357fa8a2ae0f282cf55907db7ff55c7ad74860e46540787065b4b49077dcbdf7f7521a1ba894122b5f8da3daf64c28ac30b31680c120ebbf255d0dd4bcfe3eb
@@ -2,7 +2,7 @@ require_relative 'ansible/workflow'
2
2
  require 'rbbt/workflow/usage'
3
3
 
4
4
  module Ansible
5
- def self.play(playbook, inventory = nil)
5
+ def self.play(playbook, inventory = nil, verbose = false)
6
6
  inventory = Rbbt.etc.ansible_inventory.find
7
7
  Log.with_severity 0 do
8
8
  TmpFile.with_file do |tmp|
@@ -10,7 +10,11 @@ module Ansible
10
10
  Open.write(tmp, [playbook].to_yaml)
11
11
  playbook = tmp
12
12
  end
13
- CMD.cmd_log("ansible-playbook -i #{inventory} #{playbook}")
13
+ if verbose
14
+ CMD.cmd_log("ansible-playbook -i #{inventory} -v #{playbook}")
15
+ else
16
+ CMD.cmd_log("ansible-playbook -i #{inventory} #{playbook}")
17
+ end
14
18
  end
15
19
  end
16
20
  end
@@ -46,7 +50,7 @@ module Ansible
46
50
  def self.playbook(file, task = nil, options = {})
47
51
  task = 'default' if task.nil?
48
52
 
49
- workflow = Workflow.require_workflow file
53
+ workflow = Workflow === file ? file : Workflow.require_workflow(file)
50
54
  task = workflow.tasks.keys.last if workflow.tasks[task].nil?
51
55
  workflow2playbook workflow, task, options
52
56
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-util
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.31.1
4
+ version: 5.31.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-24 00:00:00.000000000 Z
11
+ date: 2021-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake