Skip to content

Commit 16a588e

Browse files
committed
Merge branch 'release/0.2.0'
2 parents 69ed0ab + bea08d1 commit 16a588e

36 files changed

+361
-180
lines changed

.gitignore

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1-
# Ignore vagrant data
2-
.vagrant
1+
# Ansible
2+
*.retry
3+
roles/
4+
tests/roles/
35

4-
# Ignore swap files
6+
# Swap files
7+
*.swo
58
*.swp
9+
10+
# Python bytecode
11+
*.pyc
12+
13+
# Pytest
14+
.cache
15+
16+
# Tox
17+
.tox
18+
19+
# Vagrant
20+
.vagrant
21+
*.log
22+
23+
# Molecule
24+
.molecule

.pyup.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
3+
# Pyup configuration
4+
5+
branch: 'develop'

.travis.yml

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,27 @@
11
---
22

3-
# Travis file for openjdk-jdk role
3+
# Travis configuration
44

5-
language: python
6-
python: "2.7"
5+
dist: 'trusty'
6+
sudo: 'required'
77

8-
before_install:
9-
# Make sure everything's up to date.
10-
- sudo apt-get update -qq
8+
services:
9+
- 'docker'
1110

12-
install:
13-
# Install Ansible.
14-
- pip install ansible
15-
16-
# Add ansible.cfg to pick up roles path.
17-
- "cp ./tests/ansible.cfg ./"
11+
language: 'python'
1812

19-
script:
20-
# Check the role/playbook's syntax.
21-
- ansible-playbook -i tests/inventory tests/test_travis.yml --syntax-check
13+
env:
14+
matrix:
15+
- TOXENV='py27-ansible20'
16+
- TOXENV='py27-ansible21'
17+
- TOXENV='py27-ansible22'
18+
- TOXENV='py27-ansible23'
2219

23-
# Run the role/playbook with ansible-playbook.
24-
- ansible-playbook -i tests/inventory tests/test_travis.yml --connection=local --sudo
20+
install:
21+
- 'pip install tox-travis'
2522

26-
# Run the role/playbook again, checking to make sure it's idempotent.
27-
# Set change=1 due to a bug in ansible service module always return changed
28-
- >
29-
ansible-playbook -i tests/inventory tests/test_travis.yml --connection=local --sudo
30-
| grep -q 'changed=[0].*failed=0'
31-
&& (echo 'Idempotence test: pass' && exit 0)
32-
|| (echo 'Idempotence test: fail' && exit 1)
23+
script:
24+
- 'tox -e "${TOXENV}"'
3325

26+
notifications:
27+
webhooks: 'https://galaxy.ansible.com/api/v1/notifications/'

LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
The MIT License (MIT)
23

34
Copyright (c) 2015 infOpen

README.md

Lines changed: 74 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,103 @@
1-
openjdk-jdk
2-
===========
1+
# openjdk-jdk
32

43
[![Build Status](https://travis-ci.org/infOpen/ansible-role-openjdk-jdk.svg?branch=master)](https://travis-ci.org/infOpen/ansible-role-openjdk-jdk)
54

65
Install openjdk-jdk package.
76

8-
Today, this role used default config files from system packages. I'll take time
9-
later to generate templates if necessary, or accept pull requests ;)
7+
## Requirements
108

11-
Requirements
12-
------------
9+
This role requires Ansible 2.0 or higher,
10+
and platform requirements are listed in the metadata file.
1311

14-
This role requires Ansible 1.5 or higher, and platform requirements are listed
15-
in the metadata file.
12+
## Testing
1613

17-
Testing
18-
-------
14+
This role use [Molecule](https://github.com/metacloud/molecule/) to run tests.
1915

20-
This role has two test methods :
16+
Locally, you can run tests on Docker (default driver) or Vagrant.
17+
Travis run tests using Docker driver only.
2118

22-
- localy with Vagrant :
23-
vagrant up
19+
Currently, tests are done on:
20+
- Debian Jessie
21+
- Ubuntu Trusty
22+
- Ubuntu Xenial
2423

25-
- automaticaly by Travis
24+
and use:
25+
- Ansible 2.0.x
26+
- Ansible 2.1.x
27+
- Ansible 2.2.x
28+
- Ansible 2.3.x
2629

27-
Vagrant should be used to check the role before push changes to Github.
30+
### Running tests
2831

29-
Role Variables
30-
--------------
32+
#### Using Docker driver
3133

32-
Follow the possible variables with their default values
34+
```
35+
$ tox
36+
```
3337

34-
openjdk_jdk_package_state : present
35-
openjdk_jdk_version : 7
38+
#### Using Vagrant driver
3639

37-
Debian family specific vars
40+
```
41+
$ MOLECULE_DRIVER=vagrant tox
42+
```
3843

39-
openjdk_jdk_packages :
40-
- "openjdk-{{ openjdk_jdk_version }}-jdk" }}"
44+
## Role Variables
4145

42-
Dependencies
43-
------------
46+
### Default role variables
47+
48+
``` yaml
49+
# General packages variables
50+
openjdk_jdk_packages: "{{ _openjdk_jdk_packages }}"
51+
openjdk_jdk_version: "{{ _openjdk_jdk_version }}"
52+
53+
# APT specific variables
54+
openjdk_jdk_apt_update_cache: True
55+
openjdk_jdk_apt_cache_valid_time: 3600
56+
```
57+
58+
### Default Debian OS family variables
59+
60+
``` yaml
61+
_openjdk_jdk_packages:
62+
- name: "openjdk-{{ openjdk_jdk_version }}-jdk"
63+
```
64+
65+
### Default Debian Jessie variables
66+
67+
``` yaml
68+
_openjdk_jdk_version: 7
69+
```
70+
71+
### Default Ubuntu Trusty variables
72+
73+
``` yaml
74+
_openjdk_jdk_version: 7
75+
```
76+
77+
### Default Ubuntu Xenial variables
78+
79+
``` yaml
80+
_openjdk_jdk_version: 8
81+
```
82+
83+
## Dependencies
4484
4585
None
4686
47-
Example Playbook
48-
----------------
87+
## Example Playbook
4988
50-
- hosts: servers
51-
roles:
52-
- { role: achaussier.openjdk-jdk }
89+
``` yaml
90+
- hosts: servers
91+
roles:
92+
- { role: infOpen.openjdk-jdk }
93+
```
5394
54-
License
55-
-------
95+
## License
5696
5797
MIT
5898
59-
Author Information
60-
------------------
99+
## Author Information
61100
62101
Alexandre Chaussier (for Infopen company)
63102
- http://www.infopen.pro
64-
- a.chaussier [at] infopen.pro } }}"
65-
103+
- a.chaussier [at] infopen.pro

Vagrantfile

Lines changed: 0 additions & 18 deletions
This file was deleted.

defaults/main.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
---
22

3-
# Defaults file for openjdk-jdk
3+
# Defaults vars file for openjdk-jdk role
44

5-
openjdk_jdk_package_state : present
6-
openjdk_jdk_version : 7
5+
# General packages variables
6+
openjdk_jdk_packages: "{{ _openjdk_jdk_packages }}"
7+
openjdk_jdk_version: "{{ _openjdk_jdk_version }}"
78

9+
# APT specific variables
10+
openjdk_jdk_apt_update_cache: True
11+
openjdk_jdk_apt_cache_valid_time: 3600

files/.keep

Whitespace-only changes.

filter_plugins/__init__.py

Whitespace-only changes.

handlers/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
---
2-
# handlers file for openjdk-jdk
2+
3+
# Handlers main file for openjdk-jdk role

0 commit comments

Comments
 (0)