You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.4 KiB
39 lines
1.4 KiB
---
|
|
- name: Install Java 1.7 and some basic dependencies
|
|
yum: name={{item}} state=present
|
|
with_items:
|
|
- unzip
|
|
- java-1.7.0-openjdk
|
|
|
|
- name: Download JBoss from jboss.org
|
|
get_url: url=http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.zip dest=/opt/jboss-as-7.1.1.Final.zip
|
|
|
|
- name: Extract archive
|
|
command: chdir=/usr/share /usr/bin/unzip -q /opt/jboss-as-7.1.1.Final.zip creates=/usr/share/jboss-as
|
|
|
|
# Rename the dir to avoid encoding the version in the init script
|
|
- name: Rename install directory
|
|
command: chdir=/usr/share /bin/mv jboss-as-7.1.1.Final jboss-as creates=/usr/share/jboss-as
|
|
|
|
- name: Copying standalone.xml configuration file
|
|
template: src=standalone.xml dest=/usr/share/jboss-as/standalone/configuration/
|
|
notify: restart jboss
|
|
|
|
- name: Add group "jboss"
|
|
group: name=jboss
|
|
|
|
- name: Add user "jboss"
|
|
user: name=jboss group=jboss home=/usr/share/jboss-as
|
|
|
|
- name: Change ownership of JBoss installation
|
|
file: path=/usr/share/jboss-as/ owner=jboss group=jboss state=directory recurse=yes
|
|
|
|
- name: Copy the init script
|
|
copy: src=jboss-as-standalone.sh dest=/etc/init.d/jboss mode=0755
|
|
|
|
- name: Enable JBoss to be started at boot
|
|
service: name=jboss enabled=yes state=started
|
|
|
|
- name: deploy iptables rules
|
|
template: src=iptables-save dest=/etc/sysconfig/iptables
|
|
notify: restart iptables
|
|
|