foreman_ansible_core 3.0.2 → 3.0.3

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
- SHA1:
3
- metadata.gz: 3d2701f33f04f30fc268f07f895f402ae8d87b7a
4
- data.tar.gz: 569411abe75f0ecdb5f5f45df35be14c9e9c3dd9
2
+ SHA256:
3
+ metadata.gz: a45baed63d6c808d9df4b3717e427b332e45af0b49a6f652e197e7f151e5c023
4
+ data.tar.gz: da8b32e8eb3c6177299fd1fc2789f0db173e29a833323277edf4f89da9eb83de
5
5
  SHA512:
6
- metadata.gz: 51ee5269d539e37feedff2df13b82822c0f09ce5be4adba3be8ff63297b71fbe4cf51a6ca93ebfd6390cfd8f1725b1fbedb21f305e94cc3325b8f50c0cac1d98
7
- data.tar.gz: 4b6c461a3883d4b7ece4072dc537d42c0a367063185778baae53bf1fa2687d4a794f909aca604b84ceddd7cf4a28dd621b856405e9343551245ff085d6ef4d55
6
+ metadata.gz: 49118a48bf6ebb4ede1e03b6a9278aa1d507da498620db057d0fc108ae7aabf4851b1ed8ee4f515553d64a5473ed6463835cc27e08e0606220804197b867fefa
7
+ data.tar.gz: 932fb010a258d877b038daa7d0e97f599242c25282dd7d7e7ed74fa77de1050b5251fd6f0690e60746b2bd6f25406cff63ac476983a90dccb929390d2b87f453
@@ -1,3 +1,5 @@
1
+ require 'shellwords'
2
+
1
3
  module ForemanAnsibleCore
2
4
  module Runner
3
5
  class AnsibleRunner < ForemanTasksCore::Runner::Parent
@@ -80,14 +82,14 @@ module ForemanAnsibleCore
80
82
  end
81
83
 
82
84
  def write_inventory
85
+ path = File.join(@root, 'inventory', 'hosts')
86
+ data_path = File.join(@root, 'data')
83
87
  inventory_script = <<~INVENTORY_SCRIPT
84
88
  #!/bin/sh
85
- cat <<-EOS
86
- #{JSON.dump(@inventory)}
87
- EOS
89
+ cat #{::Shellwords.escape data_path}
88
90
  INVENTORY_SCRIPT
89
- path = File.join(@root, 'inventory', 'hosts')
90
91
  File.write(path, inventory_script)
92
+ File.write(data_path, JSON.dump(@inventory))
91
93
  File.chmod(0o0755, path)
92
94
  end
93
95
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ForemanAnsibleCore
4
- VERSION = '3.0.2'
4
+ VERSION = '3.0.3'
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.2
4
+ version: 3.0.3
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: 2019-11-26 00:00:00.000000000 Z
11
+ date: 2020-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -106,8 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  - !ruby/object:Gem::Version
107
107
  version: '0'
108
108
  requirements: []
109
- rubyforge_project:
110
- rubygems_version: 2.6.14
109
+ rubygems_version: 3.0.3
111
110
  signing_key:
112
111
  specification_version: 4
113
112
  summary: 'Ansible integration with Foreman (theforeman.org): core bits'