kitchen-ansible 0.0.35 → 0.0.36

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: 9c1404af95d22c9d268d6c13d457f491b8017a38
4
- data.tar.gz: 24763d73aa7e307f4118037180e2afe6310d6ee4
3
+ metadata.gz: 9617210fbf8c1839bc92c847c36f63295ae81ff3
4
+ data.tar.gz: 8f0a2209b0f4714aa17ee71f739175ab121e93f2
5
5
  SHA512:
6
- metadata.gz: c8b3bb1a6cfa884921d5cd166408751e3e9a8af90a0ef960abe16c983531170ae7273d21c3041f53ad17f280dfcd6faa3c47cd8fcadb4b9472982a2731f64ca6
7
- data.tar.gz: 58b357b98ca0d506191075260e5eb8f0ed6f2fd1efc15a2d4355a6a29f924a6f5d31b4d6ae64e3892d533f4dcb12df6432f0a58864691f7f5ab1c774c2495520
6
+ metadata.gz: 7de0292f5216051db44474734ed4fbc6160bda4a6551c2174fa2b2f5459cf96b2d3cbbc2dad8f041f8531deb8516ec9946c9da6ef385c44497995ed8fc824e65
7
+ data.tar.gz: 6176571072fd4694e83ef4469097b0357cd43a4073da6dde2d73c30ae4b14af44d3b1b9356445eb0fb1b899e84a4e1a2b1f4050aa521158700541de41d651b6e
data/README.md CHANGED
@@ -98,31 +98,7 @@ Serverspec uses ssh to communicate with the server to be tested and reads the an
98
98
 
99
99
  ### Example usage to create tomcat servers:
100
100
 
101
- ```
102
- TEST KITCHEN ANSIBLE AND SERVERSPEC TOMCAT SERVER
103
- WORKSTATION SERVER (built and destroyed (created separately
104
- (or Jenkins CI) automatically) could be docker container)
105
- +----------------------------+
106
- +-------------------+ | | +-----------------------+
107
- | test kitchen | | | | |
108
- | kitchen-ansible | create | | | |
109
- | | ser^er | | | +-----------+ |
110
- | CREATE +------------> +----------+ | | | tomcat | |
111
- | | | | | | install | | |
112
- | | install and run | ansible +---------------> | |
113
- | CONVERGE +------------+---------------> | | tomcat +-----------+ |
114
- | | | +----------+ | | |
115
- | | install| +----------+ +---------+ | test |
116
- | VERIFY +--------------->busser- |-->serverspec--------+----> |
117
- | |and run | |ansiblespec | | | | |
118
- | | | +----------+ +---------+ | +-----------------------+
119
- | DESTROY +------------> |
120
- +-------------------+ delete +----------------------------+
121
- server
122
-
123
- * All connections over SSH
124
-
125
- ```
101
+ ![test-kitchen, ansible and busser-ansiblespec](https://github.com/neillturner/ansible_repo/blob/master/kitchen-ansible.png "test-kitchen, ansible and busser-ansiblespec")
126
102
 
127
103
  See [ansible-sample-tdd](https://github.com/volanja/ansible-sample-tdd)
128
104
 
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  module Kitchen
3
3
  module Ansible
4
- VERSION = '0.0.35'
4
+ VERSION = '0.0.36'
5
5
  end
6
6
  end
@@ -51,6 +51,7 @@ module Kitchen
51
51
  default_config :require_chef_for_busser, true
52
52
  default_config :require_ruby_for_busser, false
53
53
  default_config :requirements_path, false
54
+ default_config :ssh_known_hosts, nil
54
55
  default_config :ansible_verbose, false
55
56
  default_config :ansible_verbosity, 1
56
57
  default_config :ansible_check, false
@@ -250,6 +250,13 @@ module Kitchen
250
250
  sudo_env('cp -r'), File.join(config[:root_path], 'host_vars'), '/etc/ansible/.'
251
251
  ].join(' ')
252
252
 
253
+ if config[:ssh_known_hosts]
254
+ config[:ssh_known_hosts].each do |host|
255
+ info("Add #{host} to ~/.ssh/known_hosts")
256
+ commands << "ssh-keyscan #{host} > ~/.ssh/known_hosts 2> /dev/null"
257
+ end
258
+ end
259
+
253
260
  if galaxy_requirements
254
261
  if config[:require_ansible_source]
255
262
  commands << setup_ansible_env_from_source
@@ -50,6 +50,7 @@ ansible_source_rev | | Branch or Tag to install ansible source
50
50
  ansible_host_key_checking | true | strict host key checking in ssh
51
51
  private_key | | ssh private key file for ssh connection
52
52
  idempotency_test | false | Enable to test ansible playbook idempotency
53
+ ssh_known_hosts | | List of hosts that should be added to `~/.ssh/known_hosts`
53
54
 
54
55
  ## Configuring Provisioner Options
55
56
 
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.0.35
4
+ version: 0.0.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neill Turner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-26 00:00:00.000000000 Z
11
+ date: 2015-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen