kitchen-ansible 0.46.2 → 0.46.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/kitchen/provisioner/ansible/config.rb +1 -0
- data/lib/kitchen/provisioner/ansible_playbook.rb +25 -0
- data/lib/kitchen-ansible/version.rb +1 -1
- data/provisioner_options.md +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: 8ff6c857b37974cb25f27ac23756bff7f69e8c0f
|
|
4
|
+
data.tar.gz: 3f5458a86db9f1662dc996be3e1951ba250e0b29
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c3886fdab9de7d81ec0263e5cc8fe421208907fcd5f5f74d375b076645ee774e49921e85d2179a119d13a8260e9cec63d968831d842f13dd589fcdbe9b49e93a
|
|
7
|
+
data.tar.gz: 557df5fea59f9191593cbe76f02162ea3f50c7090eaf75c4a0021440c31c8a011d7735f24330b6e16086e2fbb9a928498ee9be01343ba152afb79b5f4745c4c7
|
data/README.md
CHANGED
|
@@ -56,6 +56,7 @@ module Kitchen
|
|
|
56
56
|
default_config :require_pip, false
|
|
57
57
|
default_config :requirements_path, false
|
|
58
58
|
default_config :ssh_known_hosts, nil
|
|
59
|
+
default_config :additional_ssh_private_keys, nil
|
|
59
60
|
default_config :ansible_verbose, false
|
|
60
61
|
default_config :ansible_verbosity, 1
|
|
61
62
|
default_config :ansible_check, false
|
|
@@ -279,6 +279,7 @@ module Kitchen
|
|
|
279
279
|
prepare_lookup_plugins
|
|
280
280
|
prepare_ansible_vault_password_file
|
|
281
281
|
prepare_kerberos_conf_file
|
|
282
|
+
prepare_additional_ssh_private_keys
|
|
282
283
|
info('Finished Preparing files for transfer')
|
|
283
284
|
end
|
|
284
285
|
|
|
@@ -320,6 +321,12 @@ module Kitchen
|
|
|
320
321
|
end
|
|
321
322
|
end
|
|
322
323
|
|
|
324
|
+
if config[:additional_ssh_private_keys]
|
|
325
|
+
commands << [
|
|
326
|
+
sudo_env('cp -r'), File.join(config[:root_path], 'ssh_private_keys'), '~/.ssh'
|
|
327
|
+
].join(' ')
|
|
328
|
+
end
|
|
329
|
+
|
|
323
330
|
if ansible_inventory
|
|
324
331
|
if File.directory?(ansible_inventory)
|
|
325
332
|
Dir.foreach(ansible_inventory) do |f|
|
|
@@ -355,6 +362,7 @@ module Kitchen
|
|
|
355
362
|
end
|
|
356
363
|
|
|
357
364
|
command = commands.join(' && ')
|
|
365
|
+
debug("*** COMMAND TO RUN:")
|
|
358
366
|
debug(command)
|
|
359
367
|
command
|
|
360
368
|
end
|
|
@@ -571,6 +579,10 @@ module Kitchen
|
|
|
571
579
|
File.join(sandbox_path, 'lookup_plugins')
|
|
572
580
|
end
|
|
573
581
|
|
|
582
|
+
def tmp_additional_ssh_private_keys_dir
|
|
583
|
+
File.join(sandbox_path, 'ssh_private_keys')
|
|
584
|
+
end
|
|
585
|
+
|
|
574
586
|
def tmp_ansible_vault_password_file_path
|
|
575
587
|
File.join(sandbox_path, File.basename(ansible_vault_password_file).reverse.chomp('.').reverse)
|
|
576
588
|
end
|
|
@@ -1096,6 +1108,19 @@ module Kitchen
|
|
|
1096
1108
|
end
|
|
1097
1109
|
end
|
|
1098
1110
|
|
|
1111
|
+
def prepare_additional_ssh_private_keys
|
|
1112
|
+
info('Preparing additional_ssh_private_keys')
|
|
1113
|
+
FileUtils.mkdir_p(tmp_additional_ssh_private_keys_dir)
|
|
1114
|
+
if config[:additional_ssh_private_keys]
|
|
1115
|
+
config[:additional_ssh_private_keys].each do |key|
|
|
1116
|
+
debug("Adding additional_ssh_private_key file #{key}")
|
|
1117
|
+
FileUtils.cp_r(key, tmp_additional_ssh_private_keys_dir, remove_destination: true)
|
|
1118
|
+
end
|
|
1119
|
+
else
|
|
1120
|
+
info 'nothing to do for additional_ssh_private_keys'
|
|
1121
|
+
end
|
|
1122
|
+
end
|
|
1123
|
+
|
|
1099
1124
|
def prepare_ansible_vault_password_file
|
|
1100
1125
|
return unless ansible_vault_password_file
|
|
1101
1126
|
|
data/provisioner_options.md
CHANGED
|
@@ -28,6 +28,7 @@ key | default value | Notes
|
|
|
28
28
|
----|---------------|--------
|
|
29
29
|
additional_copy_path | | Arbitrary array of files and directories to copy into test environment, relative to the current dir, e.g. vars or included playbooks
|
|
30
30
|
additional_copy_role_path | false | additional_copy_path directories are appended to the ANSIBLE_ROLES_PATH env var when running ansible
|
|
31
|
+
additional_ssh_private_keys | | List of additional ssh private key files to be added to ~/.ssh
|
|
31
32
|
ansible_apt_repo | ppa:ansible/ansible | `apt` repo; see `https://launchpad.net` `/~ansible/+archive/ubuntu/ansible` or `rquillo/ansible`
|
|
32
33
|
ansible_binary_path | NULL | If specified this will override the location where `kitchen` tries to run `ansible-playbook` from, i.e. `ansible_binary_path: /usr/local/bin`
|
|
33
34
|
ansible_check | false | Sets the `--check` flag when running Ansible
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kitchen-ansible
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.46.
|
|
4
|
+
version: 0.46.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Neill Turner
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-03-
|
|
11
|
+
date: 2017-03-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: test-kitchen
|