Jérémy Lecour
ee21973371
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2777|524|2253|2462|:+1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/223//ansiblelint">Evolix » ansible-roles » unstable #223</a>
gitea/ansible-roles/pipeline/head This commit looks good
Fully Qualified Collection Name
58 lines
1.5 KiB
YAML
58 lines
1.5 KiB
YAML
---
|
|
|
|
- name: Set Tomcat version to 7 on Debian 8 if missing
|
|
ansible.builtin.set_fact:
|
|
tomcat_version: 7
|
|
when:
|
|
- ansible_distribution_release == "jessie"
|
|
- tomcat_version is not defined
|
|
|
|
- name: Set Tomcat version to 8 on Debian 9 if missing
|
|
ansible.builtin.set_fact:
|
|
tomcat_version: 8
|
|
when:
|
|
- ansible_distribution_release == "stretch"
|
|
- tomcat_version is not defined
|
|
|
|
- name: Set Tomcat version to 9 on Debian 10 if missing
|
|
ansible.builtin.set_fact:
|
|
tomcat_version: 9
|
|
when:
|
|
- ansible_distribution_release == "buster"
|
|
- tomcat_version is not defined
|
|
|
|
- name: Set Tomcat version to 9 on Debian 11 if missing
|
|
ansible.builtin.set_fact:
|
|
tomcat_version: 9
|
|
when:
|
|
- ansible_distribution_release == "bullseye"
|
|
- tomcat_version is not defined
|
|
|
|
- name: Install packages
|
|
ansible.builtin.apt:
|
|
name:
|
|
- "tomcat{{ tomcat_version }}"
|
|
- "tomcat{{ tomcat_version }}-user"
|
|
- "libpam-systemd"
|
|
state: present
|
|
|
|
- name: Create tomcat root dir
|
|
ansible.builtin.file:
|
|
path: "{{ tomcat_instance_root }}"
|
|
state: directory
|
|
owner: "{{ tomcat_root_dir_owner | default('root') }}"
|
|
group: "{{ tomcat_root_dir_group | default('root') }}"
|
|
mode: "0755"
|
|
|
|
- name: Copy systemd unit
|
|
ansible.builtin.template:
|
|
src: 'tomcat.service.j2'
|
|
dest: "/etc/systemd/user/tomcat.service"
|
|
mode: "0755"
|
|
|
|
- name: Disable default tomcat service
|
|
ansible.builtin.service:
|
|
name: "tomcat{{ tomcat_version }}"
|
|
state: stopped
|
|
enabled: false
|