kitchen-ansible 0.47.2 → 0.47.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
2
  SHA1:
3
- metadata.gz: c3dd8c9159c950e8fde92b7af78ea9c0fd60bd15
4
- data.tar.gz: 05953af8cd5fa4fc3e60ed8cc09463576ab19d1d
3
+ metadata.gz: a02777c2b92ce73f0f024a38a31978bc31d8f0e8
4
+ data.tar.gz: 55f7374587123f90fbc8baa5f93a6c853aecdf7f
5
5
  SHA512:
6
- metadata.gz: 8edae71515a2652af588fb5ed1524c99825235ef38ee3c7720c86b4aedb75c194200ad820bbb268033069f5cc8388fb393ef47198335bfe82fd5deb37ff89192
7
- data.tar.gz: a560098d97a3a0de38bdd326dd870bbc76a9561b5d74d824c0ff147899af53bee40eb5d93ac906429d24ad5a3a68df49e47a7ef9995a03165f8c3c6550c6ce6b
6
+ metadata.gz: d7189af481ea28b766894179a1626230e06328ffdcde93062b0bf82705104fcf90439aa2a38f15544c49953aed864815bd90f57e9fefd6d4b2579b9e4c13c587
7
+ data.tar.gz: 9b398d3756d52f5ac0bb8cd40d1ceeddaf402c6b167c18128a7a0c329be22dca76204855991b0036acae774e53ff57cf6540a8110a547dba71c5ad9e14d7b907
@@ -31,6 +31,9 @@ EOF
31
31
  s.add_development_dependency 'rspec'
32
32
  s.add_development_dependency 'pry'
33
33
  s.add_development_dependency 'rake'
34
+ if RUBY_VERSION < '2.2'
35
+ s.add_dependency 'mixlib-shellout', '<= 2.2.7'
36
+ end
34
37
  if RUBY_VERSION >= '2.0'
35
38
  s.add_dependency 'net-ssh', '>= 3'
36
39
  else
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  module Kitchen
3
3
  module Ansible
4
- VERSION = '0.47.2'.freeze
4
+ VERSION = '0.47.3'.freeze
5
5
  end
6
6
  end
@@ -85,6 +85,7 @@ module Kitchen
85
85
  default_config :custom_pre_play_command, nil
86
86
  default_config :custom_post_install_command, nil
87
87
  default_config :custom_post_play_command, nil
88
+ default_config :show_command_output, false
88
89
 
89
90
  default_config :playbook do |provisioner|
90
91
  provisioner.calculate_path('default.yml', :file) ||
@@ -113,8 +113,8 @@ module Kitchen
113
113
  end
114
114
 
115
115
  def detect_debug
116
- if ARGV.include? 'debug'
117
- result = "1"
116
+ if ARGV.include? 'debug' or config[:show_command_output]
117
+ result = "/dev/stdout"
118
118
  else
119
119
  result = "/dev/null"
120
120
  end
@@ -26,8 +26,8 @@ kitchen-ansible runs the ansible playbook command http://linux.die.net/man/1/ans
26
26
 
27
27
  key | default value | Notes
28
28
  ----|---------------|--------
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
- additional_copy_role_path | false | additional_copy_path directories are appended to the ANSIBLE_ROLES_PATH env var when running ansible
29
+ additional_copy_path | | Arbitrary array of files and directories to copy into test environment e.g. vars or included playbooks. See below section Copying Additional Files
30
+ additional_copy_role_path | | Arbitrary array of files and directories to copy into test environment and are appended to the ANSIBLE_ROLES_PATH env var when running ansible. See below section Copying Additional Files
31
31
  additional_ssh_private_keys | | List of additional ssh private key files to be added to ~/.ssh
32
32
  ansible_apt_repo | ppa:ansible/ansible | `apt` repo; see `https://launchpad.net` `/~ansible/+archive/ubuntu/ansible` or `rquillo/ansible`
33
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`
@@ -70,8 +70,8 @@ hosts | | Create Ansible hosts file for localhost with this server group or lis
70
70
  http_proxy | nil | Use HTTP proxy when installing Ansible, packages and running Ansible
71
71
  https_proxy | nil | Use HTTPS proxy when installing Ansible, packages and running Ansible
72
72
  idempotency_test | false | Enable to test Ansible playbook idempotency
73
- ignore_extensions_from_root | ['.pyc'] | allow extensions to be ignored when copying from roles and recursive_additional_copy_path
74
- ignore_paths_from_root | [] | allow extra paths to be ignored when copying from roles and recursive_additional_copy_path
73
+ ignore_extensions_from_root | ['.pyc'] | allow extensions to be ignored when copying from roles using additional_copy_role_path or doing recursive_additional_copy_path
74
+ ignore_paths_from_root | [] | allow extra paths to be ignored when copying from roles using additional_copy_role_path or using recursive_additional_copy_path
75
75
  kerberos_conf_file | | Path of krb5.conf file using in Windows support
76
76
  library_plugins_path | library | Ansible repo library plugins directory
77
77
  lookup_plugins_path | lookup_plugins | Ansible repo `lookup_plugins` directory
@@ -81,7 +81,7 @@ no_proxy | nil | List of URLs or IPs that should be excluded from proxying
81
81
  playbook | default.yml | Playbook for `ansible-playbook` to run
82
82
  private_key | | ssh private key file for ssh connection
83
83
  python_sles_repo | `http://download.opensuse.org/repositories` `/devel:/languages:/python/SLE_12` `/devel:languages:python.repo` | Zypper SuSE python repo
84
- recursive_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
84
+ recursive_additional_copy_path | | Arbitrary array of files and directories to copy into test environment. See below section Copying Additional Files
85
85
  require_ansible_omnibus | false | Set to `true` if using Omnibus Ansible `pip` install
86
86
  require_ansible_repo | true | Set if installing Ansible from a `yum` or `apt` repo
87
87
  require_ansible_source | false | Install Ansible from source using method described [here](http://docs.ansible.com/intro_installation.html#running-from-source). Only works on Debian/Ubuntu at present
@@ -94,11 +94,60 @@ retry_on_exit_code | [] | Array of exit codes to retry converge command against
94
94
  role_name | | use when the repo name does not match the name the role is published as.
95
95
  roles_path | roles | Ansible repo roles directory
96
96
  shell_command | 'sh' | Shell command to use, usually an alias for bash. may need to set to bash.
97
+ show_command_output | false | Show output of commands that are run to provision system.
97
98
  ssh_known_hosts | | List of hosts that should be added to ~/.ssh/known_hosts
98
99
  sudo_command | sudo -E | `sudo` command; change to `sudo -E -H` to be consistent with Ansible
99
100
  update_package_repos | true | Update OS repository metadata
100
101
  wait_for_retry | 30 | number of seconds to wait before retrying converge command
101
102
 
103
+ ## Copying Additional Files
104
+
105
+ Several parameters have been developed rather organically to support the requirement to copy additional files beyond the ones in the standard ansible locations.
106
+ * These could be used for the verification phase later
107
+ * additional files required by the application
108
+ * or these could be ansible roles
109
+
110
+ ### additional_copy_path - Arbitrary array of files and directories to copy into test environment
111
+ * If you specify a directory it will copy all the files to /tmp/kitchen with the directory structure
112
+ * if you specify the full file name they are copied to the top of the /tmp/kitchen folder in the server and the path is ignored.
113
+ i.e. if we have a directory data/ containing file xyz.txt
114
+ ```
115
+ additional_copy_path:
116
+ - data/xyz.txt
117
+ ```
118
+ it will copy data/xyz.txt to /tmp/kitchen/xyz.txt
119
+ * if you specify the directory without the filename it will preserve the path when copying to /tmp/kitchen.
120
+ ```
121
+ additional_copy_path:
122
+ - data
123
+ ```
124
+ it will copy data/xyz.txt to /tmp/kitchen/data/xyz.txt
125
+ NOTE: additional_copy_path does copy files that are links but if you specify the full file path only the file name is copied to /tmp/kitchen
126
+
127
+ ### recursive_additional_copy_path
128
+ This copies the directories in a resursive fashion which can work better for some directory structures
129
+ * It does not support specifying files with paths. i.e. you can only specify files at the top level of the repository
130
+ ```
131
+ recursive_additional_copy_path:
132
+ - xyz.txt
133
+ ```
134
+ * It does support copying directories in a similar fashion to additional_copy_path but uses recursion to discover the files in the directory structure which can be
135
+ problematic with files with links.
136
+ ```
137
+ recursive_additional_copy_path:
138
+ - data
139
+ ```
140
+ ### additional_copy_role_path
141
+ This is the same as additional_copy_path but adds the extra paths to the ANSIBLE_ROLES_PATH ansible command parameter.
142
+
143
+ ### ignore_paths_from_root and ignore_extensions_from_root
144
+ During recursive_additional_copy_path or additional_copy_role_path there are 2 additional parameters.
145
+ (NOTE: These don't apply with additional_copy_path)
146
+ * ignore_paths_from_root defaults to empty array []. This causes these paths to be ignored.
147
+ * ignore_extensions_from_root defaults to an array containg ['.pyc']. This causes files with these extensions to be ignored.
148
+ as these are implemented with the 'Find.prune' command they can be problematic with file links.
149
+
150
+
102
151
  ## Configuring Provisioner Options
103
152
 
104
153
  The provisioner can be configured globally or per suite, global settings act as defaults for all suites, you can then customise per suite, for example:
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.47.2
4
+ version: 0.47.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-06-24 00:00:00.000000000 Z
11
+ date: 2017-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: mixlib-shellout
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "<="
74
+ - !ruby/object:Gem::Version
75
+ version: 2.2.7
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "<="
81
+ - !ruby/object:Gem::Version
82
+ version: 2.2.7
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: net-ssh
71
85
  requirement: !ruby/object:Gem::Requirement