foreman_ansible_core 3.0.3 → 3.0.4

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: a45baed63d6c808d9df4b3717e427b332e45af0b49a6f652e197e7f151e5c023
4
- data.tar.gz: da8b32e8eb3c6177299fd1fc2789f0db173e29a833323277edf4f89da9eb83de
3
+ metadata.gz: 8b9ed358d85932fcb1710bc33ff885319f5478daa58083520749a99a2af67626
4
+ data.tar.gz: 9efdcf103ab555abb5ea60d1e8e757110a514d73a4dfa00bcd1f5cef68c81e0b
5
5
  SHA512:
6
- metadata.gz: 49118a48bf6ebb4ede1e03b6a9278aa1d507da498620db057d0fc108ae7aabf4851b1ed8ee4f515553d64a5473ed6463835cc27e08e0606220804197b867fefa
7
- data.tar.gz: 932fb010a258d877b038daa7d0e97f599242c25282dd7d7e7ed74fa77de1050b5251fd6f0690e60746b2bd6f25406cff63ac476983a90dccb929390d2b87f453
6
+ metadata.gz: b1ab98aeae41f8232d6eef1d3057e332eae7c7716768f54862b259dd7aae4236c20a0b628e8164336fcdb9d30d7ff29387f3f72eb118dd6faa55a92a745c44fe
7
+ data.tar.gz: 0e1fc4865413fc4d5be78ad7a5e5b7741103aa22618cd419d2b52ed584042588faac547427bdc46447c5fcb354b1015b704e71e75123ff89a0cdcc2daa99785c
@@ -10,6 +10,7 @@ module ForemanAnsibleCore
10
10
  @inventory = rebuild_secrets(rebuild_inventory(input), input)
11
11
  @playbook = input.values.first[:input][:action_input][:script]
12
12
  @root = working_dir
13
+ @verbosity_level = input.values.first[:input][:action_input][:verbosity_level]
13
14
  end
14
15
 
15
16
  def start
@@ -99,10 +100,19 @@ module ForemanAnsibleCore
99
100
 
100
101
  def start_ansible_runner
101
102
  command = ['ansible-runner', 'run', @root, '-p', 'playbook.yml']
103
+ command << verbosity if verbose?
102
104
  initialize_command(*command)
103
105
  logger.debug("[foreman_ansible] - Running command '#{command.join(' ')}'")
104
106
  end
105
107
 
108
+ def verbosity
109
+ '-' + 'v' * @verbosity_level.to_i
110
+ end
111
+
112
+ def verbose?
113
+ @verbosity_level.to_i.positive?
114
+ end
115
+
106
116
  def prepare_directory_structure
107
117
  inner = %w[inventory project].map { |part| File.join(@root, part) }
108
118
  ([@root] + inner).each do |path|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ForemanAnsibleCore
4
- VERSION = '3.0.3'
4
+ VERSION = '3.0.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_ansible_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3
4
+ version: 3.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Lobato Garcia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-12 00:00:00.000000000 Z
11
+ date: 2020-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop