kitchen-ansiblepush 0.3.10 → 0.3.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d8d6bf7d30f4bc065d5dc99be4ae4ff03717b026
4
- data.tar.gz: 31ac4d1244b15acc8a2ef251b9352a78c3c1486b
3
+ metadata.gz: 70b6df9e304bd8bb431e246279a24c44603b9557
4
+ data.tar.gz: 837be1b097c39fa7c12287fb056d5a1c9df8eee9
5
5
  SHA512:
6
- metadata.gz: b51d5d2531d9ff69d1c346bdcc57b09d5386463cf46efe9ff70fee0bf82e703d1174b56aaf0104e695bd38ac69c08a8704b33b38f8e37144156f8a29c9e8dfec
7
- data.tar.gz: 5ac8d7bf9f1b557aa91a519f648b2276f841a5fac767afb195708bd9d116ac5d576edbb8536e78def391542b9122870dacc326ce9f7a53ffdd3fc8bb267bc149
6
+ metadata.gz: 52957dc93c327c9d1b0223ad280226f3361a3591cc94783bd0fd65180d1d18378c4d8d171b376e50e0d5531e771ae92404800014719da80836c9b878f19ddfcd
7
+ data.tar.gz: ef3146e472217508e6abe909c89a199393e123674b3f10cf3596d65d46299bd72c3880125871b83e23140ad9bf528baf6ad48c5f8a81b869e849987df88b2209
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # kitchen-ansiblepush
2
+ [![Gem Version](https://badge.fury.io/rb/kitchen-ansiblepush.svg)](https://badge.fury.io/rb/kitchen-ansiblepush)
2
3
 
3
4
  A test-kitchen plugin that adds the support for ansible in push mode
4
5
 
@@ -49,7 +50,8 @@ provisioner :
49
50
  vault_password_file : "/..../file"
50
51
  host_key_checking : false
51
52
  generate_inv : true
52
-
53
+ use_instance_name : false # use short (platform) instead of instance name by default
54
+
53
55
  ```
54
56
  ## idempotency test
55
57
  If you want to check your code is idempotent you can use the idempotency_test. Essentially, this will run Ansible twice and check nothing changed in the next run. If something changed it will list the tasks. Note: If your using Ansible callback in your config this might conflict.
data/callback/changes.py CHANGED
@@ -4,7 +4,6 @@ import errno
4
4
 
5
5
  try:
6
6
  from ansible.plugins.callback import CallbackBase
7
- print "Using changes callback for V2"
8
7
  except ImportError:
9
8
  print "Fallback to Ansible 1.x compatibility"
10
9
  CallbackBase = object
@@ -1,5 +1,5 @@
1
1
  module Kitchen
2
2
  module AnsiblePush
3
- VERSION = "0.3.10"
3
+ VERSION = "0.3.11"
4
4
  end
5
5
  end
@@ -40,6 +40,7 @@ module Kitchen
40
40
  default_config :raw_arguments, nil
41
41
  default_config :idempotency_test, false
42
42
  default_config :fail_non_idempotent, true
43
+ default_config :use_instance_name, false
43
44
 
44
45
  # For tests disable if not needed
45
46
  default_config :chef_bootstrap_url, "https://www.getchef.com/chef/install.sh"
@@ -88,7 +89,11 @@ module Kitchen
88
89
 
89
90
  def machine_name
90
91
  return @machine_name if defined? @machine_name
91
- @machine_name = instance.name.gsub(/[<>]/, '').split("-").drop(1).join("-")
92
+ unless config[:use_instance_name]
93
+ @machine_name = instance.name.gsub(/[<>]/, '').split("-").drop(1).join("-")
94
+ else
95
+ @machine_name = instance.name.gsub(/[<>]/, '')
96
+ end
92
97
  debug("machine_name=" + @machine_name.to_s)
93
98
  @machine_name
94
99
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-ansiblepush
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.10
4
+ version: 0.3.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adham Helal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-23 00:00:00.000000000 Z
11
+ date: 2016-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  version: '0'
96
96
  requirements: []
97
97
  rubyforge_project: '[none]'
98
- rubygems_version: 2.0.14
98
+ rubygems_version: 2.0.14.1
99
99
  signing_key:
100
100
  specification_version: 4
101
101
  summary: ansible provisioner for test-kitchen