Skip to content
This repository was archived by the owner on Mar 6, 2023. It is now read-only.

Commit 69840c9

Browse files
authored
ansible 2.6 + allow remote docker host (#46)
[minor] New ansible just came out ( https://github.com/ansible/ansible/blob/stable-2.6/changelogs/CHANGELOG-v2.6.rst ) Also allow using remote docker host.
1 parent 12243f4 commit 69840c9

File tree

6 files changed

+19
-7
lines changed

6 files changed

+19
-7
lines changed

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
1+
---
12
sudo: required
23
language: python
34
cache: pip
45
services:
56
- docker
67
env:
7-
- ANSIBLE=2.3
88
- ANSIBLE=2.4
99
- ANSIBLE=2.5
10+
- ANSIBLE=2.6
11+
matrix:
12+
fast_finish: true
1013
install:
1114
- pip install tox-travis git-semver
1215
script:
1316
- tox
1417
deploy:
1518
provider: script
1619
skip_cleanup: true
17-
script: ./.travis/releaser.sh
20+
script: .travis/releaser.sh
1821
on:
1922
branch: master
2023
branches:

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Deploy prometheus [node exporter](https://github.com/prometheus/node_exporter) u
1414

1515
## Requirements
1616

17-
- Ansible >= 2.3
17+
- Ansible >= 2.4
1818

1919
## Role Variables
2020

@@ -60,6 +60,8 @@ tox -e py27-ansible25 -- molecule test -s default
6060
```
6161
For more information about molecule go to their [docs](http://molecule.readthedocs.io/en/latest/).
6262

63+
If you would like to run tests on remote docker host just specify `DOCKER_HOST` variable before running tox tests.
64+
6365
## Travis CI
6466

6567
Combining molecule and travis CI allows us to test how new PRs will behave when used with multiple ansible versions and multiple operating systems. This also allows use to create test scenarios for different role configurations. As a result we have a quite large test matrix which will take more time than local testing, so please be patient.

meta/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ galaxy_info:
33
author: Roman Demachkovych, Pawel Krupa
44
description: Prometheus Node Exporter
55
license: MIT
6-
min_ansible_version: 2.3
6+
min_ansible_version: 2.4
77
platforms:
88
- name: Ubuntu
99
versions:

molecule/default/molecule.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,37 @@ lint:
88
platforms:
99
- name: bionic
1010
image: paulfantom/ubuntu-molecule:18.04
11+
docker_host: "${DOCKER_HOST:-unix://var/run/docker.sock}"
1112
privileged: true
1213
volumes:
1314
- /sys/fs/cgroup:/sys/fs/cgroup:ro
1415
- name: xenial
1516
image: paulfantom/ubuntu-molecule:16.04
17+
docker_host: "${DOCKER_HOST:-unix://var/run/docker.sock}"
1618
privileged: true
1719
volumes:
1820
- /sys/fs/cgroup:/sys/fs/cgroup:ro
1921
- name: stretch
2022
image: paulfantom/debian-molecule:9
23+
docker_host: "${DOCKER_HOST:-unix://var/run/docker.sock}"
2124
privileged: true
2225
volumes:
2326
- /sys/fs/cgroup:/sys/fs/cgroup:ro
2427
- name: jessie
2528
image: paulfantom/debian-molecule:8
29+
docker_host: "${DOCKER_HOST:-unix://var/run/docker.sock}"
2630
privileged: true
2731
volumes:
2832
- /sys/fs/cgroup:/sys/fs/cgroup:ro
2933
- name: centos7
3034
image: paulfantom/centos-molecule:7
35+
docker_host: "${DOCKER_HOST:-unix://var/run/docker.sock}"
3136
privileged: true
3237
volumes:
3338
- /sys/fs/cgroup:/sys/fs/cgroup:ro
3439
- name: fedora
3540
image: paulfantom/fedora-molecule:27
41+
docker_host: "${DOCKER_HOST:-unix://var/run/docker.sock}"
3642
privileged: true
3743
volumes:
3844
- /sys/fs/cgroup:/sys/fs/cgroup:ro

test-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ molecule>=2.15.0
22
docker
33
ansible-lint>=3.4.0
44
testinfra>=1.7.0
5+
jmespath

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
[tox]
22
minversion = 1.8
3-
envlist = py{27}-ansible{23,24,25}
3+
envlist = py{27}-ansible{24,25,26}
44
skipsdist = true
55

66
[travis:env]
77
ANSIBLE=
8-
2.3: ansible23
98
2.4: ansible24
109
2.5: ansible25
10+
2.6: ansible26
1111

1212
[testenv]
1313
passenv = *
1414
deps =
1515
-rtest-requirements.txt
16-
ansible23: ansible<2.4
1716
ansible24: ansible<2.5
1817
ansible25: ansible<2.6
18+
ansible26: ansible<2.7
1919
commands =
2020
{posargs:molecule test --all --destroy always}

0 commit comments

Comments
 (0)