cetic.liferay
Ansible Role: Liferay
This role installs Liferay on RHEL/CentOS servers using ansible.
Requirements
--
Role Variables
Below are the variables you can set along with their default values (see defaults/main.yml):
liferay
liferay_port: '8080'liferay_db_user: 'liferay'liferay_db_password: 'liferay'liferay_default_database_url: "jdbc:mysql://{{ ip_mysql }}/liferay?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false"liferay_archive_url: 'http://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.2.3%20GA4/liferay-portal-tomcat-6.2-ce-ga4-20150416163831865.zip'liferay_version: '6.2.ce'liferay_bundle_base_dir_name: 'liferay-portal-6.2-ce-ga4'
The archive for Liferay to be installed. If a matching file exists in local, it will be used.
liferay_unpack_folder: '/opt'
The directory on the server where Liferay will be unpacked.
liferay_home: '/opt/liferay'
This is Liferay's home directory.
liferay_user: 'liferay'liferay_group: 'liferay'
The user and group under which Liferay will run.
liferay_dl_folder: '{{ liferay_home }}/data/document_library/'
This folder is for storing files in Liferay's document library.
liferay_bundle_tomcat_version: '7.0.42'liferay_tomcat_dir: '{{ liferay_home }}/tomcat-{{ liferay_bundle_tomcat_version }}'
This specifies the version of Tomcat bundled with the current Liferay installation.
liferay_autodeploy_dir: '{{liferay_home}}/deploy'liferay_enable_remote_debug: falseliferay_cluster_autodetect: google.com:80liferay_db_host: '127.0.0.1'liferay_default_database_driver: 'com.mysql.jdbc.Driver'liferay_additional_databases: []
Details about the Liferay database.
geerlingguy java
java_home: '/lib/jvm/jre-1.8.0-openjdk'
Dependencies
- geerlingguy.java
Example Playbook
- hosts: liferay
vars:
mysql_databases:
- name: liferay
mysql_users:
- name: liferay
password: liferay
priv: "liferay.*:ALL"
become: true
roles:
- role: geerlingguy.java
when: "ansible_os_family == 'RedHat'"
java_packages:
- java-1.8.0-openjdk
- role: geerlingguy.mysql
- role: cetic.liferay
Tests
Testing locally with Vagrant
You can test this ansible role using vagrant. Check the Vagrantfile for more details.
Testing with Travis
Refer to the playbook for Travis CI tests (tests/test.yml).
Future improvements
- Provide a more recent version of Liferay
- Add Solr plugin
- Support for Linux
Contributions are welcome!
License
MIT License
