Skip to content

Commit

Permalink
Merge pull request #12 from idealista/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jdvr authored Dec 21, 2017
2 parents f64a70c + 4979a89 commit 218c1a0
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a ch

## [Unreleased](https://github.com/idealista/tomcat-role/tree/develop)

## [1.2.0](https://github.com/idealista/tomcat-role/tree/1.2.0)

### Added
- *[#5](https://github.com/idealista/tomcat-role/issues/5) Add a name for the downloaded war during deployment* @jdvr

## [1.1.2](https://github.com/idealista/tomcat-role/tree/1.1.2)

### Fixed
Expand Down
5 changes: 3 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ tomcat_users:
## Deploy
tomcat_download_wars: true
tomcat_war_to_deploy_urls:
- https://tomcat.apache.org/tomcat-8.5-doc/appdev/sample/sample.war
- url: https://tomcat.apache.org/tomcat-8.5-doc/appdev/sample/sample.war
name: sample.war
tomcat_local_wars: false
tomcat_war_to_deploy_path:
- "{{ playbook_dir }}/sample.war"
- "{{ playbook_dir }}/sample.war"
6 changes: 3 additions & 3 deletions tasks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

- name: Tomcat | Download wars on webapps
get_url:
url: "{{ item }}"
dest: "{{ tomcat_webapps_path }}"
url: "{{ item.url }}"
dest: "{{ tomcat_webapps_path }}/{{ item.name }}"
mode: 0755
validate_certs: no
with_items: "{{ tomcat_war_to_deploy_urls }}"
Expand All @@ -16,4 +16,4 @@
dest: "{{ tomcat_webapps_path }}"
mode: 0755
with_items: "{{ tomcat_war_to_deploy_path }}"
when: tomcat_local_wars
when: tomcat_local_wars
6 changes: 3 additions & 3 deletions tests/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM geerlingguy/docker-debian9-ansible:latest
FROM idealista/java-role:latest

# This is to override Testinfra issue with Debian 9 Docker image
# This is to override Testinfra issue with Idealista Java Docker image
RUN touch /tmp/systemd
RUN ln -s /tmp/systemd /sbin/init
RUN ln -s /tmp/systemd /sbin/init
4 changes: 2 additions & 2 deletions tests/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
with_items:
- net-tools
roles:
- role: java
- role: tomcat-role
- java
- tomcat-role
4 changes: 2 additions & 2 deletions tests/test_ansible.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ def test_tomcat_service(File, Service, Socket, AnsibleDefaults):
assert File("/lib/systemd/system/tomcat.service").exists
assert Service("tomcat").is_enabled
assert Service("tomcat").is_running
assert Socket("tcp://0.0.0.0:" + str(ajp_port)).is_listening
assert Socket("tcp://0.0.0.0:" + str(http_port)).is_listening
assert Socket("tcp://0.0.0.0:" + str(ajp_port)).is_listening or Socket("tcp://:::" + str(ajp_port)).is_listening
assert Socket("tcp://0.0.0.0:" + str(http_port)).is_listening or Socket("tcp://:::" + str(http_port)).is_listening

0 comments on commit 218c1a0

Please sign in to comment.