Skip to content

Commit

Permalink
Bump version, merge set_facts into vars.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdebock committed Mar 26, 2019
1 parent c05bd67 commit 0689d38
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# The explicit version to use when referring to the short name.
tomcat_version7: 7.0.93
tomcat_version8: 8.5.38
tomcat_version8: 8.5.39
tomcat_version9: 9.0.17

# The location where to download Apache Tomcat from.
Expand Down
12 changes: 5 additions & 7 deletions tasks/instance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

- name: install tomcat instance
unarchive:
src: "{{ tomcat_mirror }}/{{ tomcat_archives[instance.version | default(tomcat_version)]['url_path'] }}/{{ tomcat_archives[instance.version | default(tomcat_version)]['targz'] }}"
src: "{{ tomcat_unarchive_url }}"
dest: "{{ tomcat_directory }}/{{ instance.name }}"
owner: "{{ instance.user | default(tomcat_user) }}"
group: "{{ instance.group | default(tomcat_group) }}"
Expand Down Expand Up @@ -53,19 +53,17 @@
notify:
- restart tomcat instance

- name: set variable for service role
set_fact:
- name: create service instance
import_role:
name: robertdebock.service
vars:
service_list:
- name: "{{ instance.name | default(tomcat_name) }}"
description: "{{ instance.name | default(tomcat_name) }}"
start_command: "{{ tomcat_directory }}/{{ instance.name | default(tomcat_directory) }}/bin/catalina.sh run"
user_name: "{{ instance.user | default(tomcat_user) }}"
group_name: "{{ instance.group | default(tomcat_group) }}"

- name: create service instance
import_role:
name: robertdebock.service

- name: start and enable tomcat instance
service:
name: "{{ instance.name }}"
Expand Down
2 changes: 2 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ _tomcat_validate_certs:
CentOS-6: no

tomcat_validate_certs: "{{ _tomcat_validate_certs[ansible_distribution ~ '-' ~ ansible_distribution_major_version] | default(_tomcat_validate_certs['default']) }}"

tomcat_unarchive_url: "{{ tomcat_mirror }}/{{ tomcat_archives[instance.version | default(tomcat_version)]['url_path'] }}/{{ tomcat_archives[instance.version | default(tomcat_version)]['targz'] }}"

0 comments on commit 0689d38

Please sign in to comment.