Skip to content

Commit f0abf6c

Browse files
authored
Merge pull request #12 from ansiblebit/2.24.x
2.24.x
2 parents a4ade23 + 22cdcc1 commit f0abf6c

File tree

10 files changed

+131
-49
lines changed

10 files changed

+131
-49
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*.retry
2-
**/dependencies/*
2+
**/roles/*
33

44
# Created by https://www.gitignore.io
55

.travis.yml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,22 @@ sudo: yes
33

44
matrix:
55
include:
6+
- python: 3.6
7+
env: TOXENV=py36-ansible27
8+
- python: 3.6
9+
env: TOXENV=py36-ansible26
10+
- python: 3.6
11+
env: TOXENV=py36-ansible25
12+
- python: 2.7
13+
env: TOXENV=py27-ansible24
14+
- python: 2.7
15+
env: TOXENV=py27-ansible23
16+
- python: 2.7
17+
env: TOXENV=py27-ansible22
618
- python: 2.7
719
env: TOXENV=py27-ansible21
820
- python: 2.7
921
env: TOXENV=py27-ansible20
10-
- python: 2.7
11-
env: TOXENV=py27-ansible19
1222

1323
install:
1424
- pip install tox
@@ -17,12 +27,23 @@ script:
1727
- tox
1828

1929
notifications:
20-
webhooks: https://galaxy.ansible.com/api/v1/notifications/
30+
email: false
31+
slack:
32+
template:
33+
- "%{repository_name}@%{branch} %{commit} : [%{build_number}] %{result} "
34+
- "%{build_url}"
35+
- "'%{commit_subject}' by %{author}"
36+
- "%{elapsed_time} : %{duration}"
37+
- "%{message}"
38+
rooms:
39+
secure:xxx
40+
on_success: always
41+
on_failure: always
42+
webhooks: https://galaxy.ansible.com/api/v1/notifications/
2143

2244
before_cache:
23-
- rm -f ${HOME}/.cache/pip/log/debug.log
45+
- "find ${HOME}/.pip -name log -o -name __pycache__ -type d | xargs -I {} rm -rf {}"
2446

2547
cache:
2648
directories:
27-
- ${HOME}/.cache/pip
28-
49+
- "${HOME}/.cache/pip"

tests/Vagrantfile

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ require 'yaml'
44

55
PLAYBOOK = 'test.yml'
66
CONFIGURATION_FILE = 'boxes.yml'
7+
ROLE_NAME = "#{File.expand_path("..").split("/")[-1]}"
78

89
Vagrant.configure('2') do |config|
910

@@ -24,15 +25,16 @@ Vagrant.configure('2') do |config|
2425
config.vm.define box_name do |host|
2526

2627
host.vm.box = box_settings['box'] unless not box_settings.key? 'box'
28+
host.vm.box_version = box_settings['box_version'] unless not box_settings.key? 'box_version'
2729

2830
host.vm.network box_settings['network']['name'], ip: box_settings['network']['ip'] unless box_settings.key? 'network'
29-
host.vm.network :forwarded_port, guest: 3000, host: 3000
3031
host.vm.synced_folder '.', '/vagrant', disabled: true
3132

3233
# puts "[DEBUG] applying virtualbox settings for #{box_name} box..."
3334
customize_args = [ "modifyvm", :id ]
34-
box_settings['provider']['virtualbox'].collect { |k, v| customize_args |= ["--#{k}", v.to_s] }
35+
vagrant_environment['provider']['virtualbox'].collect { |k, v| customize_args |= ["--#{k}", v.to_s] }
3536
host.vm.provider 'virtualbox' do |vb|
37+
vb.name = "#{ROLE_NAME}_#{box_name}"
3638
vb.customize customize_args
3739
end
3840

@@ -47,7 +49,19 @@ Vagrant.configure('2') do |config|
4749
'yakkety64.vagrant.dev' => {
4850
'ansible_python_interpreter' => '/usr/bin/python2.7',
4951
'playbook_python2' => true
50-
}
52+
},
53+
'artful64.vagrant.dev' => {
54+
'ansible_python_interpreter' => '/usr/bin/python2.7',
55+
'playbook_python2' => true
56+
},
57+
'bionic64.vagrant.dev' => {
58+
'ansible_python_interpreter' => '/usr/bin/python2.7',
59+
'playbook_python2' => true
60+
},
61+
'cosmic64.vagrant.dev' => {
62+
'ansible_python_interpreter' => '/usr/bin/python2.7',
63+
'playbook_python2' => true
64+
},
5165
}
5266

5367
ansible.playbook = PLAYBOOK

tests/ansible.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ host_key_checking = False
66

77
private_key_file = ~/.vagrant.d/insecure_private_key
88

9-
roles_path = ../../:../:dependencies
10-
9+
roles_path = ../../:../

tests/boxes.yml

Lines changed: 67 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
# file: influxdb/tests/boxes.yml
33
#
44

5+
provider:
6+
virtualbox:
7+
memory: 1024
8+
cpus: 1
9+
510
vagrant:
611

712
# Debian
@@ -13,48 +18,70 @@ vagrant:
1318
name: private_network
1419
ip: 192.168.122.1
1520

16-
provider:
17-
virtualbox:
18-
memory: 1024
19-
cpus: 1
20-
2121
wheezy64.vagrant.dev:
2222
enabled: true
2323
box: debian/wheezy64
2424
network:
2525
name: private_network
2626
ip: 192.168.122.2
2727

28-
provider:
29-
virtualbox:
30-
memory: 1024
31-
cpus: 1
28+
stretch64.vagrant.dev:
29+
enabled: false
30+
box: debian/stretch64
31+
network:
32+
name: private_network
33+
ip: 192.168.122.3
3234

3335
# Ubuntu
3436

37+
precise32.vagrant.dev:
38+
enabled: false
39+
box: ubuntu/precise32
40+
network:
41+
name: private_network
42+
ip: 192.168.124.1
43+
3544
precise64.vagrant.dev:
36-
enabled: true
45+
enabled: false
3746
box: ubuntu/precise64
3847
network:
3948
name: private_network
4049
ip: 192.168.124.2
4150

42-
provider:
43-
virtualbox:
44-
memory: 1024
45-
cpus: 1
51+
trusty32.vagrant.dev:
52+
enabled: false
53+
box: ubuntu/trusty32
54+
network:
55+
name: private_network
56+
ip: 192.168.124.3
4657

4758
trusty64.vagrant.dev:
48-
enabled: true
59+
enabled: false
4960
box: ubuntu/trusty64
5061
network:
5162
name: private_network
5263
ip: 192.168.124.4
5364

54-
provider:
55-
virtualbox:
56-
memory: 1024
57-
cpus: 1
65+
vivid32.vagrant.dev:
66+
enabled: false
67+
box: ubuntu/vivid32
68+
network:
69+
name: private_network
70+
ip: 192.168.124.5
71+
72+
vivid64.vagrant.dev:
73+
enabled: false
74+
box: ubuntu/vivid64
75+
network:
76+
name: private_network
77+
ip: 192.168.124.6
78+
79+
wily64.vagrant.dev:
80+
enabled: true
81+
box: ubuntu/wily64
82+
network:
83+
name: private_network
84+
ip: 192.168.124.7
5885

5986
xenial64.vagrant.dev:
6087
enabled: true
@@ -63,19 +90,30 @@ vagrant:
6390
name: private_network
6491
ip: 192.168.124.8
6592

66-
provider:
67-
virtualbox:
68-
memory: 1024
69-
cpus: 1
70-
7193
yakkety64.vagrant.dev:
72-
enabled: false
94+
enabled: true
7395
box: ubuntu/yakkety64
7496
network:
7597
name: private_network
7698
ip: 192.168.124.9
7799

78-
provider:
79-
virtualbox:
80-
memory: 1024
81-
cpus: 1
100+
artful64.vagrant.dev:
101+
enabled: true
102+
box: ubuntu/artful64
103+
network:
104+
name: private_network
105+
ip: 192.168.124.10
106+
107+
bionic64.vagrant.dev:
108+
enabled: true
109+
box: ubuntu/bionic64
110+
network:
111+
name: private_network
112+
ip: 192.168.124.11
113+
114+
cosmic64.vagrant.dev:
115+
enabled: true
116+
box: ubuntu/cosmic64
117+
network:
118+
name: private_network
119+
ip: 192.168.124.12
File renamed without changes.

tests/setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ test -s ${DIR}/../requirements.yml \
2929
&& ansible-galaxy install \
3030
--force \
3131
-r ${DIR}/../requirements.yml \
32-
--roles-path=${DIR}/dependencies \
32+
--roles-path=${DIR}/roles \
3333
|| true

tests/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
tasks:
99
- raw: sudo apt-get update -qq && sudo apt-get install -qq python2.7
10+
changed_when: no
1011
when: playbook_python2 is defined and
1112
playbook_python2
1213

tests/vagrant.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Bash script to run the test suite against the Vagrant environment.
55
#
6-
# version: 1.2
6+
# version: 1.8
77
#
88
# usage:
99
#
@@ -16,6 +16,9 @@
1616
#
1717
# changelog:
1818
#
19+
# v1.8 : 10 August 2016
20+
# - force provisioning
21+
#
1922
# v1.6 : 10 Jun 2016
2023
# - exit if USER environment variable is travis
2124
#
@@ -61,7 +64,7 @@ do
6164
if [ ! -n "${BOX+1}" ] || [ "${BOX}" = "${VAGRANT_BOX}" ]; then
6265

6366
echo "[INFO] preparing ${VAGRANT_BOX}..."
64-
vagrant up ${VAGRANT_BOX} 2> /dev/null
67+
vagrant up --provision ${VAGRANT_BOX} 2> /dev/null
6568
if [ $? -ne 0 ]; then
6669
# box not enabled
6770
continue
@@ -74,4 +77,3 @@ do
7477
vagrant destroy -f ${VAGRANT_BOX}
7578
fi
7679
done
77-

tox.ini

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
{py27}-{ansible21,ansible20,ansible19}
3+
py{36,27}-ansible{27,26,25,24,23,22,21,20,19}
44

55
skipsdist = True
66

@@ -9,9 +9,16 @@ skipsdist = True
99
changedir = tests
1010

1111
deps =
12-
ansible21: ansible==2.1.*
13-
ansible20: ansible==2.0.*
14-
ansible19: ansible==1.9.*
12+
ansible27: ansible>=2.7,<2.8
13+
ansible26: ansible>=2.6,<2.7
14+
ansible25: ansible>=2.5,<2.6
15+
ansible24: ansible>=2.4,<2.5
16+
ansible23: ansible>=2.3,<2.4
17+
ansible22: ansible>=2.2,<2.3
18+
ansible21: ansible>=2.1,<2.2
19+
ansible20: ansible>=2.0.0,<2.1
20+
ansible19: ansible>=1.9,<2.0.0
21+
1522

1623
passenv = ANSIBLE_ASK_SUDO_PASS HOME LANG LC_ALL TRAVIS USER
1724

0 commit comments

Comments
 (0)