This guide deploys Apache Syncope components with Java, database backend, and servlet container.
- name: Install Apache Syncope on Debian family
hosts: syncope_debian
become: true
vars:
syncope_version: "3.0.6"
syncope_download_url: "https://downloads.apache.org/syncope/{{ syncope_version }}/apache-syncope-{{ syncope_version }}-war.zip"
syncope_install_dir: /opt/syncope
tasks:
- name: Install dependencies
ansible.builtin.apt:
update_cache: true
name:
- openjdk-17-jdk
- tomcat10
- postgresql
- unzip
- curl
state: present
- name: Create Syncope install directory
ansible.builtin.file:
path: "{{ syncope_install_dir }}"
state: directory
mode: "0755"
- name: Download Syncope WAR bundle
ansible.builtin.get_url:
url: "{{ syncope_download_url }}"
dest: /tmp/syncope-war.zip
mode: "0644"
failed_when: false
- name: Extract Syncope WAR bundle
ansible.builtin.unarchive:
src: /tmp/syncope-war.zip
dest: "{{ syncope_install_dir }}"
remote_src: true
failed_when: false
- name: Deploy Syncope core WAR
ansible.builtin.copy:
src: "{{ syncope_install_dir }}/apache-syncope-{{ syncope_version }}-war/core/target/syncope.war"
dest: /var/lib/tomcat10/webapps/syncope.war
remote_src: true
failed_when: false
- name: Enable and start services
ansible.builtin.systemd:
name: "{{ item }}"
enabled: true
state: started
loop:
- postgresql
- tomcat10
- name: Install Apache Syncope on RHEL family
hosts: syncope_rhel
become: true
vars:
syncope_version: "3.0.6"
syncope_download_url: "https://downloads.apache.org/syncope/{{ syncope_version }}/apache-syncope-{{ syncope_version }}-war.zip"
syncope_install_dir: /opt/syncope
tasks:
- name: Install dependencies
ansible.builtin.dnf:
name:
- java-17-openjdk-devel
- tomcat
- postgresql-server
- unzip
- curl
state: present
- name: Create Syncope install directory
ansible.builtin.file:
path: "{{ syncope_install_dir }}"
state: directory
mode: "0755"
- name: Download Syncope WAR bundle
ansible.builtin.get_url:
url: "{{ syncope_download_url }}"
dest: /tmp/syncope-war.zip
mode: "0644"
failed_when: false
- name: Extract Syncope WAR bundle
ansible.builtin.unarchive:
src: /tmp/syncope-war.zip
dest: "{{ syncope_install_dir }}"
remote_src: true
failed_when: false
- name: Deploy Syncope core WAR
ansible.builtin.copy:
src: "{{ syncope_install_dir }}/apache-syncope-{{ syncope_version }}-war/core/target/syncope.war"
dest: /var/lib/tomcat/webapps/syncope.war
remote_src: true
failed_when: false
- name: Enable and start services
ansible.builtin.systemd:
name: "{{ item }}"
enabled: true
state: started
loop:
- postgresql
- tomcat
ansible-playbook -i inventory.ini syncope-install.yml
syncope_debian.tomcat9 vs tomcat10) per distribution release.We develop tailored automation solutions for:
Let’s discuss your requirements: office@linux-server-admin.com | Contact