Skip to content

Commit

Permalink
Merge pull request #28 from idealista/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jmonterrubio authored Apr 20, 2021
2 parents c8ea8b9 + 6770b62 commit 4802a18
Show file tree
Hide file tree
Showing 26 changed files with 826 additions and 199 deletions.
10 changes: 10 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

exclude_paths:
- ./molecule
parseable: true
skip_list:
- '204'
- '503'
- '303'
use_default_rules: true
verbosity: 1
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.yml linguist-detectable=true
*.yaml linguist-detectable=true
*.html linguist-detectable=false
17 changes: 12 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
.molecule
.vagrant
.cache/
tests/__pycache__/
tests/playbook.retry
.python-version
tests/.cache
__pycache__
.pytest_cache
.molecule
.cache

*.iml
.idea
.project

*.pyc
**/.vscode
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
language: python
python: "3.7"
os: linux
services:
- docker
install:
- pip install pipenv
- pipenv sync
env:
jobs:
- MOLECULE_DISTRO=idealista/jdk:8u252-stretch-openjdk-headless
script:
- pipenv run molecule test

notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
30 changes: 30 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
# Based on ansible-lint config
extends: default

ignore: |
molecule/**/tests/

rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
colons:
max-spaces-after: -1
level: error
commas:
max-spaces-after: -1
level: error
empty-lines:
max: 3
level: error
hyphens:
level: error
key-duplicates: enable
line-length: disable
new-lines:
type: unix
truthy: disable
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a changelog](https://github.com/olivierlacan/keep-a-changelog).

## [Unreleased](https://github.com/idealista/wildfly-role/tree/develop)
## [1.4.0](https://github.com/idealista/wildfly-role/tree/1.3.0) (2021-04-20)
[Full Changelog](https://github.com/idealista/wildfly-role/compare/1.3.0...1.4.0)
### Added
- *[#26](https://github.com/idealista/wildfly-role/issues/26) Update to molecule 3 and ansible 2.9* @jmonterrubio

## [1.3.0](https://github.com/idealista/wildfly-role/tree/1.3.0) (2018-02-21)
[Full Changelog](https://github.com/idealista/wildfly-role/compare/1.2.0...1.3.0)
Expand Down
15 changes: 15 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
ansible = "==2.9.14"
ansible-lint = "==4.2.0"
molecule = "==3.0.4"
docker = "==4.2.2"

[requires]
python_version = "3.7"
555 changes: 555 additions & 0 deletions Pipfile.lock

Large diffs are not rendered by default.

24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![Logo](logo.gif)
![Logo](https://raw.githubusercontent.com/idealista/wildfly-role/master/logo.gif)

# WildFly Ansible role
# WildFly Ansible Role [![Build Status](https://travis-ci.com/idealista/wildfly-role.png)](https://travis-ci.com/idealista/wildfly-role)

This Ansible role installs a WildFly server in a Debian environment. Based on the instructions present in [this GitHub Gist](https://gist.github.com/sukharevd/6087988).

Expand All @@ -20,10 +20,12 @@ These instructions will get you a copy of the role for your Ansible Playbook. On

### Prerequisities

Ansible 2.3.1.0 version installed.
For compatible Ansible versions check [.travis.yml](.travis.yml).
Inventory destination should be a Debian environment.

For testing purposes, [Molecule](https://molecule.readthedocs.io/) with [Vagrant](https://www.vagrantup.com/) as driver (with [vagrant-hostmanager](https://github.com/devopsgroup-io/vagrant-hostmanager)) and [VirtualBox](https://www.virtualbox.org/) as provider.
For testing purposes, [Molecule](https://molecule.readthedocs.io/) with Docker as driver and [Goss](http://goss.rocks) as verifier.

This role needs a system with java previously installed. Its really recommended the use of idealista's java role for that purpose: [idealista.java-role](https://github.com/idealista/java_role).

### Installing

Expand Down Expand Up @@ -53,15 +55,23 @@ Use in a playbook:

## Usage

Look to the defaults properties file to see the possible configuration properties.
Look to the [defaults](defaults/main.yml) properties file to see the possible configuration properties.

## Testing

Execute ``` molecule test ``` under wildfly-role folder to run the automated tests suite.
```sh
pipenv sync
pipenv shell
```

For more information read the [pipenv docs](https://docs.pipenv.org/).


## Built With

![Ansible](https://img.shields.io/badge/ansible-2.3.1.0-green.svg)
![Ansible](https://img.shields.io/badge/ansible-2.9.14-green.svg)
![Molecule](https://img.shields.io/badge/molecule-3.0.4-green.svg)
![Goss](https://img.shields.io/badge/goss-0.3.16-green.svg)

## Versioning

Expand Down
3 changes: 2 additions & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
galaxy_info:
company: Idealista S.A.U.
author: Idealista S.A.U.
description: wildfly role to install and configure this server
min_ansible_version: 2.3.1.0
license: Apache 2.0
Expand All @@ -9,5 +10,5 @@ galaxy_info:
versions:
- jessie
- stretch
categories:
galaxy_tags:
- container
91 changes: 0 additions & 91 deletions molecule.yml

This file was deleted.

12 changes: 12 additions & 0 deletions molecule/default/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Molecule managed

{% if item.registry is defined %}
FROM {{ item.registry.url }}/{{ item.image }}
{% else %}
FROM {{ item.image }}
{% endif %}

# install minimal packages for debian slim images
RUN apt-get update && \
apt-get install -y python sudo bash ca-certificates iproute2 systemd systemd-sysv python-pip curl && \
apt-get clean
7 changes: 7 additions & 0 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---

- name: Converge
hosts: all
roles:
- role: java
- role: wildfly-role
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ wildfly_running_configuration_file: "{{ wildfly_conf_path }}/standalone.conf"

wildfly_management_users:
- {
name: admin,
password: admin
}
name: admin,
password: admin
}

## JAVA
java_jdk_vendor: openjdk
java_open_jdk_version: 8u275-b01-1~deb9u1
33 changes: 33 additions & 0 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---

dependency:
name: galaxy
driver:
name: docker
lint: |
yamllint .
ansible-lint .
platforms:
- name: wildfly
groups:
- wildfly
image: ${MOLECULE_DISTRO:-idealista/jdk:8u252-stretch-openjdk-headless}
privileged: false
command: '/lib/systemd/systemd'
capabilities:
- SYS_ADMIN
volumes:
- '/sys/fs/cgroup:/sys/fs/cgroup:ro'
tmpfs:
- '/run'
- '/run/lock'
- '/tmp'

provisioner:
name: ansible
lint:
name: ansible-lint
verifier:
name: ansible
directory: ./tests
4 changes: 4 additions & 0 deletions molecule/default/requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
- src: idealista.java_role
version: 5.1.0
name: java
17 changes: 17 additions & 0 deletions molecule/default/tests/test_wildfly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---

group:
wildfly:
exists: true

user:
wildfly:
exists: true
groups:
- wildfly

port:
tcp:8080:
listening: true
ip:
- 0.0.0.0
Loading

0 comments on commit 4802a18

Please # to comment.