kitchen-ansible 0.0.19 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +195 -195
- data/kitchen-ansible.gemspec +35 -35
- data/lib/kitchen-ansible/version.rb +5 -5
- data/lib/kitchen/provisioner/ansible/config.rb +149 -144
- data/lib/kitchen/provisioner/ansible/librarian.rb +83 -83
- data/lib/kitchen/provisioner/ansible_playbook.rb +694 -673
- data/provisioner_options.md +95 -93
- metadata +3 -3
data/provisioner_options.md
CHANGED
@@ -1,93 +1,95 @@
|
|
1
|
-
|
2
|
-
# Provisioner Options
|
3
|
-
|
4
|
-
key | default value | Notes
|
5
|
-
----|---------------|--------
|
6
|
-
ansible_version | "latest"| desired version, affects apt installs
|
7
|
-
ansible_platform | naively tries to determine | OS platform of server
|
8
|
-
require_ansible_repo | true | Set if using a ansible install from yum or apt repo
|
9
|
-
ansible_apt_repo | "ppa:ansible/ansible" | apt repo. see https://launchpad.net /~ansible/+archive/ubuntu/ansible or rquillo/ansible
|
10
|
-
ansible_yum_repo | https://download.fedoraproject.org /pub/epel/6/i386/epel-release-6-8.noarch.rpm | yum repo
|
11
|
-
roles_path | roles | ansible repo roles directory
|
12
|
-
group_vars_path | group_vars | ansible repo group_vars directory
|
13
|
-
host_vars_path | host_vars | ansible repo hosts directory
|
14
|
-
filter_plugins | filter_plugins | ansible repo filter_plugins directory
|
15
|
-
additional_copy_path | | arbitrary array of files and directories to copy into test environment, relative to CWD. (eg, vars or included playbooks)
|
16
|
-
extra_vars | Hash.new | Hash to set the extra_vars passed to ansibile-playbook command
|
17
|
-
playbook | 'default.yml' | playbook for ansible-playbook to run
|
18
|
-
modules_path | | ansible repo manifests directory
|
19
|
-
ansible_verbose| false| Extra information logging
|
20
|
-
ansible_verbosity| 1| Sets the verbosity flag appropriately (e.g.: `1 => '-v', 2 => '-vv', 3 => '-vvv" ...`) Valid values are one of: `1, 2, 3, 4` OR `:info, :warn, :debug, :trace`.
|
21
|
-
ansible_check| false| Sets the `--check` flag when running Ansible
|
22
|
-
ansible_diff| false| Sets the `--diff` flag when running Ansible
|
23
|
-
update_package_repos| true| update OS repository metadata
|
24
|
-
require_ruby_for_busser|true|install ruby to run busser for tests
|
25
|
-
ansiblefile_path | | Path to Ansiblefile
|
26
|
-
requirements_path | | Path to ansible-galaxy requirements
|
27
|
-
ansible_vault_password_file| | Path of Ansible Vault Password File
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
$kitchen_root/ansible/$suite_name/
|
1
|
+
|
2
|
+
# Provisioner Options
|
3
|
+
|
4
|
+
key | default value | Notes
|
5
|
+
----|---------------|--------
|
6
|
+
ansible_version | "latest"| desired version, affects apt installs
|
7
|
+
ansible_platform | naively tries to determine | OS platform of server
|
8
|
+
require_ansible_repo | true | Set if using a ansible install from yum or apt repo
|
9
|
+
ansible_apt_repo | "ppa:ansible/ansible" | apt repo. see https://launchpad.net /~ansible/+archive/ubuntu/ansible or rquillo/ansible
|
10
|
+
ansible_yum_repo | https://download.fedoraproject.org /pub/epel/6/i386/epel-release-6-8.noarch.rpm | yum repo
|
11
|
+
roles_path | roles | ansible repo roles directory
|
12
|
+
group_vars_path | group_vars | ansible repo group_vars directory
|
13
|
+
host_vars_path | host_vars | ansible repo hosts directory
|
14
|
+
filter_plugins | filter_plugins | ansible repo filter_plugins directory
|
15
|
+
additional_copy_path | | arbitrary array of files and directories to copy into test environment, relative to CWD. (eg, vars or included playbooks)
|
16
|
+
extra_vars | Hash.new | Hash to set the extra_vars passed to ansibile-playbook command
|
17
|
+
playbook | 'default.yml' | playbook for ansible-playbook to run
|
18
|
+
modules_path | | ansible repo manifests directory
|
19
|
+
ansible_verbose| false| Extra information logging
|
20
|
+
ansible_verbosity| 1| Sets the verbosity flag appropriately (e.g.: `1 => '-v', 2 => '-vv', 3 => '-vvv" ...`) Valid values are one of: `1, 2, 3, 4` OR `:info, :warn, :debug, :trace`.
|
21
|
+
ansible_check| false| Sets the `--check` flag when running Ansible
|
22
|
+
ansible_diff| false| Sets the `--diff` flag when running Ansible
|
23
|
+
update_package_repos| true| update OS repository metadata
|
24
|
+
require_ruby_for_busser|true|install ruby to run busser for tests
|
25
|
+
ansiblefile_path | | Path to Ansiblefile
|
26
|
+
requirements_path | | Path to ansible-galaxy requirements
|
27
|
+
ansible_vault_password_file| | Path of Ansible Vault Password File
|
28
|
+
ansible_connection | local | Connection for Hosts and Groups
|
29
|
+
ansible_inventory_file | hosts | Custom inventory file
|
30
|
+
require_ansible_omnibus | false | Set if using omnibus ansible install
|
31
|
+
ansible_omnibus_url | | omnibus ansible install location.
|
32
|
+
ansible_omnibus_remote_path | "/opt/ansible" | Server Installation location of an omnibus ansible install.
|
33
|
+
require_chef_for_busser|false|install chef to run busser for tests. NOTE: kitchen 1.4 only requires ruby to run busser so this is not required.
|
34
|
+
chef_bootstrap_url |https://www.getchef.com /chef/install.sh| the chef install
|
35
|
+
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.
|
36
|
+
|
37
|
+
## Configuring Provisioner Options
|
38
|
+
|
39
|
+
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:
|
40
|
+
|
41
|
+
```yaml
|
42
|
+
---
|
43
|
+
driver:
|
44
|
+
name: vagrant
|
45
|
+
|
46
|
+
provisioner:
|
47
|
+
name: ansible_playbook
|
48
|
+
roles_path: roles
|
49
|
+
hosts: tomcat-servers
|
50
|
+
require_ansible_repo: true
|
51
|
+
ansible_verbose: true
|
52
|
+
ansible_verbosity: 2
|
53
|
+
ansible_diff: true
|
54
|
+
|
55
|
+
platforms:
|
56
|
+
- name: nocm_ubuntu-12.04
|
57
|
+
driver_plugin: vagrant
|
58
|
+
driver_config:
|
59
|
+
box: nocm_ubuntu-12.04
|
60
|
+
box_url: http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box
|
61
|
+
|
62
|
+
suites:
|
63
|
+
- name: default
|
64
|
+
```
|
65
|
+
|
66
|
+
**NOTE:** With Test-Kitchen 1.4 you not longer need chef install to run the tests. You just need ruby installed version 1.9 or higher and also add to the .kitchen.yml file
|
67
|
+
|
68
|
+
```yaml
|
69
|
+
verifier:
|
70
|
+
ruby_bindir: '/usr/bin'
|
71
|
+
```
|
72
|
+
where /usr/bin is the location of the ruby command.
|
73
|
+
|
74
|
+
|
75
|
+
in this example, vagrant will download a box for ubuntu 1204 with no configuration management installed, then install the latest ansible and ansible playbook against a ansible repo from the /repository/ansible_repo directory using the defailt manifest site.yml
|
76
|
+
|
77
|
+
To override a setting at the suite-level, specify the setting name under the suite's attributes:
|
78
|
+
|
79
|
+
```yaml
|
80
|
+
suites:
|
81
|
+
- name: server
|
82
|
+
attributes:
|
83
|
+
extra_vars:
|
84
|
+
server_installer_url: http://downloads.app.com/v1.0
|
85
|
+
tags:
|
86
|
+
- server
|
87
|
+
```
|
88
|
+
|
89
|
+
### Per-suite Structure
|
90
|
+
|
91
|
+
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:
|
92
|
+
|
93
|
+
$kitchen_root/ansible/$suite_name/roles
|
94
|
+
$kitchen_root/ansible/$suite_name/modules
|
95
|
+
$kitchen_root/ansible/$suite_name/Ansiblefile
|
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.
|
4
|
+
version: 0.0.20
|
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-07-
|
11
|
+
date: 2015-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
124
|
rubyforge_project: "[none]"
|
125
|
-
rubygems_version: 2.
|
125
|
+
rubygems_version: 2.4.8
|
126
126
|
signing_key:
|
127
127
|
specification_version: 4
|
128
128
|
summary: ansible provisioner for test-kitchen
|