install.yml
1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
# tasks file for jboss
- name: Check that Java is present
yum:
name: "{{ java_version }}"
state: present
tags:
- java_install
- install_yml
- name: Add a System user that runs the JBoss process
user:
name: "{{ system_user }}"
state: present
system: yes
tags:
- add_system_user
- install_yml
- name: Copy the zip file to the remote server and unzip
unarchive:
src: "{{ pkg_location | default('files/') }}{{ jboss_zip }}"
dest: "{{ install_location }}"
owner: "{{ system_user }}"
group: "{{ system_user }}"
creates: "{{ install_location }}{{ jboss_zip[:-6] }}/"
tags:
- copy_installer_zip
- install_yml
- name: Copy the init script to /etc/init.d/
copy:
src: "{{ jboss_service_conf_home }}{{ jboss_service_script }}"
dest: /etc/init.d/{{ service_name }}
mode: 0755
remote_src: yes
tags:
- copy_init_script
- install_yml
- name: copy the JBoss service config to /etc/default/
template:
src: templates/{{ jboss_service_conf }}
dest: /etc/default/
owner: "{{ system_user }}"
group: "{{ system_user }}"
notify: restart jboss
tags:
- copy_service_config
- install_yml
- name: reload daemon
systemd:
daemon_reload: yes
tags:
- reload_daemon
- install_yml