Skip to content

Commit

Permalink
Ensures that tomcat8 role works with tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
dbernstein committed Jun 21, 2019
1 parent f9cbc08 commit b625593
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 30 deletions.
31 changes: 31 additions & 0 deletions tasks/define-home.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---

# Include variables and define needed variables.
- name: Include OS-specific variables.
include_vars: "{{ ansible_os_family }}.yml"

- name: Define tomcat8_home
set_fact:
tomcat8_home: "{{ __tomcat8_home }}"
when: tomcat8_home is not defined

- name: Define tomcat8_version
set_fact:
tomcat8_version: "{{ __tomcat8_version }}"
when:
- tomcat8_version is not defined
- __tomcat8_version is defined

- name: Define tomcat_binary_url
set_fact:
tomcat_binary_url: "{{ __tomcat_binary_url }}"
when:
- tomcat_binary_url is not defined
- __tomcat_binary_url is defined

- name: Define tomcat_target_dir
set_fact:
tomcat_target_dir: "{{ __tomcat_target_dir }}"
when:
- tomcat_target_dir is not defined
- __tomcat_target_dir is defined
36 changes: 6 additions & 30 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,11 @@
---

# Include variables and define needed variables.
- name: Include OS-specific variables.
include_vars: "{{ ansible_os_family }}.yml"

- name: Define tomcat8_home
set_fact:
tomcat8_home: "{{ __tomcat8_home }}"
when: tomcat8_home is not defined

- name: Define tomcat8_version
set_fact:
tomcat8_version: "{{ __tomcat8_version }}"
when:
- tomcat8_version is not defined
- __tomcat8_version is defined

- name: Define tomcat_binary_url
set_fact:
tomcat_binary_url: "{{ __tomcat_binary_url }}"
when:
- tomcat_binary_url is not defined
- __tomcat_binary_url is defined

- name: Define tomcat_target_dir
set_fact:
tomcat_target_dir: "{{ __tomcat_target_dir }}"
when:
- tomcat_target_dir is not defined
- __tomcat_target_dir is defined

- include: "define-home.yml"
tags:
- tomcat8
- tomcat8-config
- tomcat8-install

- include: "install-{{ ansible_os_family }}.yml"
tags:
- tomcat8
Expand Down

0 comments on commit b625593

Please sign in to comment.