kitchen-ansible 0.44.4 → 0.44.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +224 -224
- data/kitchen-ansible.gemspec +39 -39
- data/lib/kitchen-ansible/version.rb +6 -6
- data/lib/kitchen/provisioner/ansible/config.rb +172 -171
- data/lib/kitchen/provisioner/ansible/librarian.rb +78 -78
- data/lib/kitchen/provisioner/ansible/os.rb +69 -69
- data/lib/kitchen/provisioner/ansible/os/amazon.rb +42 -42
- data/lib/kitchen/provisioner/ansible/os/debian.rb +69 -69
- data/lib/kitchen/provisioner/ansible/os/redhat.rb +70 -70
- data/lib/kitchen/provisioner/ansible/os/suse.rb +44 -44
- data/lib/kitchen/provisioner/ansible_playbook.rb +1040 -1039
- data/provisioner_options.md +100 -100
- metadata +16 -16
data/provisioner_options.md
CHANGED
@@ -1,100 +1,100 @@
|
|
1
|
-
# Provisioner Options
|
2
|
-
|
3
|
-
kitchen-ansible runs the ansible playbook command http://linux.die.net/man/1/ansible-playbook with options from parameters in the kitchen.yml file:
|
4
|
-
|
5
|
-
key | default value | Notes
|
6
|
-
----|---------------|--------
|
7
|
-
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
|
8
|
-
ansible_apt_repo | ppa:ansible/ansible | `apt` repo; see `https://launchpad.net` `/~ansible/+archive/ubuntu/ansible` or `rquillo/ansible`
|
9
|
-
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`
|
10
|
-
ansible_check | false | Sets the `--check` flag when running Ansible
|
11
|
-
ansible_connection | local | use `ssh` if the host is not `localhost` (Linux) or `winrm` (Windows) or `none` if defined in inventory
|
12
|
-
ansible_diff | false | Sets the `--diff` flag when running Ansible
|
13
|
-
ansible_extra_flags | | Additional options to pass to ansible-playbook, e.g. `'--skip-tags=redis'`
|
14
|
-
ansible_host_key_checking | true | Strict host key checking in ssh
|
15
|
-
ansible_inventory | | Static or dynamic inventory file or directory or 'none' if defined in `ansible.cfg`
|
16
|
-
ansible_limit | | Further limits the selected host/group patterns
|
17
|
-
ansible_omnibus_remote_path | /opt/ansible | Server installation location of an Omnibus Ansible install
|
18
|
-
ansible_omnibus_url | `https://raw.githubusercontent.com` `/neillturner/omnibus-ansible` `/master/ansible_install.sh` | Omnibus Ansible install location
|
19
|
-
ansible_platform | Naively tries to determine | OS platform of server
|
20
|
-
ansible_playbook_command | | Override the Ansible playbook command
|
21
|
-
ansible_sles_repo | `http://download.opensuse.org/repositories` `/systemsmanagement/SLE_12` `/systemsmanagement.repo` | Zypper SuSE Ansible repo
|
22
|
-
ansible_source_rev | | Branch or tag to install Ansible source
|
23
|
-
ansible_sudo | true | Determines whether `ansible-playbook` is executed as root or as the current authenticated user
|
24
|
-
ansible_vault_password_file | | Path to Ansible Vault password file
|
25
|
-
ansible_verbose | false | Extra information logging
|
26
|
-
ansible_verbosity | 1 | Sets the verbosity flag appropriately, e.g.: `1 => '-v', 2 => '-vv', 3 => '-vvv' ...`. Valid values are: `1, 2, 3, 4` or `:info, :warn, :debug, :trace`
|
27
|
-
ansible_version | latest | Desired version, only affects `apt-get` installs
|
28
|
-
ansible_yum_repo | nil | `yum` repo for EL platforms
|
29
|
-
ansiblefile_path | | Path to Ansiblefile
|
30
|
-
callback_plugins_path | callback_plugins | Ansible repo `callback_plugins` directory
|
31
|
-
chef_bootstrap_url | `https://www.getchef.com/chef/install.sh` | The Chef install
|
32
|
-
enable_yum_epel | false | Enable the `yum` EPEL repo
|
33
|
-
extra_vars | Hash.new | Hash to set the `extra_vars` passed to `ansible-playbook` command
|
34
|
-
filter_plugins_path | filter_plugins | Ansible repo `filter_plugins` directory
|
35
|
-
group_vars_path | group_vars | Ansible repo group_vars directory
|
36
|
-
host_vars_path | host_vars | Ansible repo hosts directory
|
37
|
-
hosts | | Create Ansible hosts file for localhost with this server group
|
38
|
-
http_proxy | nil | Use HTTP proxy when installing Ansible, packages and running Ansible
|
39
|
-
https_proxy | nil | Use HTTPS proxy when installing Ansible, packages and running Ansible
|
40
|
-
idempotency_test | false | Enable to test Ansible playbook idempotency
|
41
|
-
ignore_paths_from_root | [] | allow extra paths to be ignored when copying from roles and ansible cfg
|
42
|
-
kerberos_conf_file | | Path of krb5.conf file using in Windows support
|
43
|
-
library_plugins_path | library | Ansible repo library plugins directory
|
44
|
-
lookup_plugins_path | lookup_plugins | Ansible repo `lookup_plugins` directory
|
45
|
-
modules_path | | Ansible repo manifests directory
|
46
|
-
no_proxy | nil | List of URLs or IPs that should be excluded from proxying
|
47
|
-
playbook | default.yml | Playbook for `ansible-playbook` to run
|
48
|
-
private_key | | ssh private key file for ssh connection
|
49
|
-
python_sles_repo | `http://download.opensuse.org/repositories` `/devel:/languages:/python/SLE_12` `/devel:languages:python.repo` | Zypper SuSE python repo
|
50
|
-
require_ansible_omnibus | false | Set to `true` if using Omnibus Ansible `pip` install
|
51
|
-
require_ansible_repo | true | Set if installing Ansible from a `yum` or `apt` repo
|
52
|
-
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
|
53
|
-
require_chef_for_busser | true | Install Chef to run Busser for tests. NOTE: kitchen 1.4 only requires Ruby to run Busser so this is not required.
|
54
|
-
require_pip | false | Set to `true` if Ansible is to be installed through `pip`).
|
55
|
-
require_ruby_for_busser | false | Install Ruby to run Busser for tests
|
56
|
-
require_windows_support | false | Install [Windows support](http://docs.ansible.com/ansible/intro_windows.html)
|
57
|
-
requirements_path | | Path to Ansible Galaxy requirements
|
58
|
-
roles_path | roles | Ansible repo roles directory
|
59
|
-
ssh_known_hosts | | List of hosts that should be added to ~/.ssh/known_hosts
|
60
|
-
sudo_command | sudo -E | `sudo` command; change to `sudo -E -H` to be consistent with Ansible
|
61
|
-
update_package_repos | true | Update OS repository metadata
|
62
|
-
|
63
|
-
## Configuring Provisioner Options
|
64
|
-
|
65
|
-
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:
|
66
|
-
|
67
|
-
```yaml
|
68
|
-
---
|
69
|
-
driver:
|
70
|
-
name: vagrant
|
71
|
-
|
72
|
-
provisioner:
|
73
|
-
name: ansible_playbook
|
74
|
-
roles_path: roles
|
75
|
-
hosts: tomcat-servers
|
76
|
-
require_ansible_repo: true
|
77
|
-
ansible_verbose: true
|
78
|
-
ansible_verbosity: 2
|
79
|
-
ansible_diff: true
|
80
|
-
|
81
|
-
platforms:
|
82
|
-
- name: nocm_ubuntu-12.04
|
83
|
-
driver_plugin: vagrant
|
84
|
-
driver_config:
|
85
|
-
box: nocm_ubuntu-12.04
|
86
|
-
box_url: http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box
|
87
|
-
|
88
|
-
suites:
|
89
|
-
- name: default
|
90
|
-
```
|
91
|
-
|
92
|
-
### Per-suite Structure
|
93
|
-
|
94
|
-
It can be beneficial to keep different Ansible layouts for different suites. Rather than having to specify the roles, modules, etc for each suite, you can create the following directory structure and they will automatically be found:
|
95
|
-
|
96
|
-
```
|
97
|
-
$kitchen_root/ansible/$suite_name/roles
|
98
|
-
$kitchen_root/ansible/$suite_name/modules
|
99
|
-
$kitchen_root/ansible/$suite_name/Ansiblefile
|
100
|
-
```
|
1
|
+
# Provisioner Options
|
2
|
+
|
3
|
+
kitchen-ansible runs the ansible playbook command http://linux.die.net/man/1/ansible-playbook with options from parameters in the kitchen.yml file:
|
4
|
+
|
5
|
+
key | default value | Notes
|
6
|
+
----|---------------|--------
|
7
|
+
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
|
8
|
+
ansible_apt_repo | ppa:ansible/ansible | `apt` repo; see `https://launchpad.net` `/~ansible/+archive/ubuntu/ansible` or `rquillo/ansible`
|
9
|
+
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`
|
10
|
+
ansible_check | false | Sets the `--check` flag when running Ansible
|
11
|
+
ansible_connection | local | use `ssh` if the host is not `localhost` (Linux) or `winrm` (Windows) or `none` if defined in inventory
|
12
|
+
ansible_diff | false | Sets the `--diff` flag when running Ansible
|
13
|
+
ansible_extra_flags | | Additional options to pass to ansible-playbook, e.g. `'--skip-tags=redis'`
|
14
|
+
ansible_host_key_checking | true | Strict host key checking in ssh
|
15
|
+
ansible_inventory | | Static or dynamic inventory file or directory or 'none' if defined in `ansible.cfg`
|
16
|
+
ansible_limit | | Further limits the selected host/group patterns
|
17
|
+
ansible_omnibus_remote_path | /opt/ansible | Server installation location of an Omnibus Ansible install
|
18
|
+
ansible_omnibus_url | `https://raw.githubusercontent.com` `/neillturner/omnibus-ansible` `/master/ansible_install.sh` | Omnibus Ansible install location
|
19
|
+
ansible_platform | Naively tries to determine | OS platform of server
|
20
|
+
ansible_playbook_command | | Override the Ansible playbook command
|
21
|
+
ansible_sles_repo | `http://download.opensuse.org/repositories` `/systemsmanagement/SLE_12` `/systemsmanagement.repo` | Zypper SuSE Ansible repo
|
22
|
+
ansible_source_rev | | Branch or tag to install Ansible source
|
23
|
+
ansible_sudo | true | Determines whether `ansible-playbook` is executed as root or as the current authenticated user
|
24
|
+
ansible_vault_password_file | | Path to Ansible Vault password file
|
25
|
+
ansible_verbose | false | Extra information logging
|
26
|
+
ansible_verbosity | 1 | Sets the verbosity flag appropriately, e.g.: `1 => '-v', 2 => '-vv', 3 => '-vvv' ...`. Valid values are: `1, 2, 3, 4` or `:info, :warn, :debug, :trace`
|
27
|
+
ansible_version | latest | Desired version, only affects `apt-get` installs
|
28
|
+
ansible_yum_repo | nil | `yum` repo for EL platforms
|
29
|
+
ansiblefile_path | | Path to Ansiblefile
|
30
|
+
callback_plugins_path | callback_plugins | Ansible repo `callback_plugins` directory
|
31
|
+
chef_bootstrap_url | `https://www.getchef.com/chef/install.sh` | The Chef install
|
32
|
+
enable_yum_epel | false | Enable the `yum` EPEL repo
|
33
|
+
extra_vars | Hash.new | Hash to set the `extra_vars` passed to `ansible-playbook` command
|
34
|
+
filter_plugins_path | filter_plugins | Ansible repo `filter_plugins` directory
|
35
|
+
group_vars_path | group_vars | Ansible repo group_vars directory
|
36
|
+
host_vars_path | host_vars | Ansible repo hosts directory
|
37
|
+
hosts | | Create Ansible hosts file for localhost with this server group
|
38
|
+
http_proxy | nil | Use HTTP proxy when installing Ansible, packages and running Ansible
|
39
|
+
https_proxy | nil | Use HTTPS proxy when installing Ansible, packages and running Ansible
|
40
|
+
idempotency_test | false | Enable to test Ansible playbook idempotency
|
41
|
+
ignore_paths_from_root | [] | allow extra paths to be ignored when copying from roles and ansible cfg
|
42
|
+
kerberos_conf_file | | Path of krb5.conf file using in Windows support
|
43
|
+
library_plugins_path | library | Ansible repo library plugins directory
|
44
|
+
lookup_plugins_path | lookup_plugins | Ansible repo `lookup_plugins` directory
|
45
|
+
modules_path | | Ansible repo manifests directory
|
46
|
+
no_proxy | nil | List of URLs or IPs that should be excluded from proxying
|
47
|
+
playbook | default.yml | Playbook for `ansible-playbook` to run
|
48
|
+
private_key | | ssh private key file for ssh connection
|
49
|
+
python_sles_repo | `http://download.opensuse.org/repositories` `/devel:/languages:/python/SLE_12` `/devel:languages:python.repo` | Zypper SuSE python repo
|
50
|
+
require_ansible_omnibus | false | Set to `true` if using Omnibus Ansible `pip` install
|
51
|
+
require_ansible_repo | true | Set if installing Ansible from a `yum` or `apt` repo
|
52
|
+
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
|
53
|
+
require_chef_for_busser | true | Install Chef to run Busser for tests. NOTE: kitchen 1.4 only requires Ruby to run Busser so this is not required.
|
54
|
+
require_pip | false | Set to `true` if Ansible is to be installed through `pip`).
|
55
|
+
require_ruby_for_busser | false | Install Ruby to run Busser for tests
|
56
|
+
require_windows_support | false | Install [Windows support](http://docs.ansible.com/ansible/intro_windows.html)
|
57
|
+
requirements_path | | Path to Ansible Galaxy requirements
|
58
|
+
roles_path | roles | Ansible repo roles directory
|
59
|
+
ssh_known_hosts | | List of hosts that should be added to ~/.ssh/known_hosts
|
60
|
+
sudo_command | sudo -E | `sudo` command; change to `sudo -E -H` to be consistent with Ansible
|
61
|
+
update_package_repos | true | Update OS repository metadata
|
62
|
+
|
63
|
+
## Configuring Provisioner Options
|
64
|
+
|
65
|
+
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:
|
66
|
+
|
67
|
+
```yaml
|
68
|
+
---
|
69
|
+
driver:
|
70
|
+
name: vagrant
|
71
|
+
|
72
|
+
provisioner:
|
73
|
+
name: ansible_playbook
|
74
|
+
roles_path: roles
|
75
|
+
hosts: tomcat-servers
|
76
|
+
require_ansible_repo: true
|
77
|
+
ansible_verbose: true
|
78
|
+
ansible_verbosity: 2
|
79
|
+
ansible_diff: true
|
80
|
+
|
81
|
+
platforms:
|
82
|
+
- name: nocm_ubuntu-12.04
|
83
|
+
driver_plugin: vagrant
|
84
|
+
driver_config:
|
85
|
+
box: nocm_ubuntu-12.04
|
86
|
+
box_url: http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box
|
87
|
+
|
88
|
+
suites:
|
89
|
+
- name: default
|
90
|
+
```
|
91
|
+
|
92
|
+
### Per-suite Structure
|
93
|
+
|
94
|
+
It can be beneficial to keep different Ansible layouts for different suites. Rather than having to specify the roles, modules, etc for each suite, you can create the following directory structure and they will automatically be found:
|
95
|
+
|
96
|
+
```
|
97
|
+
$kitchen_root/ansible/$suite_name/roles
|
98
|
+
$kitchen_root/ansible/$suite_name/modules
|
99
|
+
$kitchen_root/ansible/$suite_name/Ansiblefile
|
100
|
+
```
|
metadata
CHANGED
@@ -1,83 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-ansible
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.44.
|
4
|
+
version: 0.44.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neill Turner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pry
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: net-ssh
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '3.0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '3.0'
|
83
83
|
description: |+
|
@@ -117,17 +117,17 @@ require_paths:
|
|
117
117
|
- lib
|
118
118
|
required_ruby_version: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
120
|
-
- -
|
120
|
+
- - '>='
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
124
|
requirements:
|
125
|
-
- -
|
125
|
+
- - '>='
|
126
126
|
- !ruby/object:Gem::Version
|
127
127
|
version: '0'
|
128
128
|
requirements: []
|
129
|
-
rubyforge_project:
|
130
|
-
rubygems_version: 2.
|
129
|
+
rubyforge_project: '[none]'
|
130
|
+
rubygems_version: 2.0.14.1
|
131
131
|
signing_key:
|
132
132
|
specification_version: 4
|
133
133
|
summary: ansible provisioner for test-kitchen
|