|
---
|
|
- name: install Kivi dependencies
|
|
hosts: "{{ target }}"
|
|
|
|
tasks:
|
|
- name: update repos and install dependencies
|
|
ansible.builtin.apt:
|
|
name:
|
|
- git
|
|
- libalgorithm-checkdigits-perl
|
|
- libapache2-mod-fcgid
|
|
- libarchive-zip-perl
|
|
- libcam-pdf-perl
|
|
- libcgi-pm-perl
|
|
- libclone-perl
|
|
- libconfig-std-perl
|
|
- libcrypt-pbkdf2-perl
|
|
- libdaemon-generic-perl
|
|
- libdatetime-event-cron-perl
|
|
- libdatetime-perl
|
|
- libdatetime-set-perl
|
|
- libdbd-pg-perl
|
|
- libdbi-perl
|
|
- libemail-address-perl
|
|
- libemail-mime-perl
|
|
- libexception-class-perl
|
|
- libfcgi-perl
|
|
- libfile-copy-recursive-perl
|
|
- libfile-flock-perl
|
|
- libfile-mimeinfo-perl
|
|
- libfile-slurp-perl
|
|
- libgd-gd2-perl
|
|
- libhtml-restrict-perl
|
|
- libimage-info-perl
|
|
- libimager-perl
|
|
- libimager-qrcode-perl
|
|
- libipc-run-perl
|
|
- libjson-perl
|
|
- liblist-moreutils-perl
|
|
- liblist-utilsby-perl
|
|
- libmath-round-perl
|
|
- libnet-smtp-ssl-perl
|
|
- libnet-sslglue-perl
|
|
- libparams-validate-perl
|
|
- libpbkdf2-tiny-perl
|
|
- libpdf-api2-perl
|
|
- libregexp-ipv6-perl
|
|
- librest-client-perl
|
|
- librose-db-object-perl
|
|
- librose-db-perl
|
|
- librose-object-perl
|
|
- libset-infinite-perl
|
|
- libsort-naturally-perl
|
|
- libstring-shellquote-perl
|
|
- libtemplate-perl
|
|
- libtext-csv-xs-perl
|
|
- libtext-iconv-perl
|
|
- libtext-unidecode-perl
|
|
- libtry-tiny-perl
|
|
- liburi-perl
|
|
- libwww-perl
|
|
- libxml-libxml-perl
|
|
- libxml-writer-perl
|
|
- libyaml-perl
|
|
- poppler-utils
|
|
state: present
|
|
update_cache: yes
|
|
become: true
|
|
|
|
- name: postrgesql for kivi
|
|
hosts: "{{ target }}"
|
|
|
|
tasks:
|
|
- name: install postgresql
|
|
ansible.builtin.apt:
|
|
name:
|
|
- postgresql
|
|
- postgresql-contrib
|
|
state: present
|
|
become: true
|
|
|
|
- name: copy config files
|
|
ansible.builtin.copy:
|
|
src: config-files/postgresql/pg_hba.conf
|
|
dest: /etc/postgresql/14/main/pg_hba.conf
|
|
mode: '640'
|
|
become: true
|
|
|
|
- name: start postgresql
|
|
ansible.builtin.service:
|
|
name: postgresql
|
|
state: restarted
|
|
become: true
|
|
|
|
- name: apache server for kivi
|
|
hosts: "{{ target }}"
|
|
|
|
tasks:
|
|
- name: install apache server
|
|
ansible.builtin.apt:
|
|
name: apache2
|
|
state: present
|
|
become: true
|
|
|
|
- name: start apache if not running
|
|
ansible.builtin.service:
|
|
name: apache2
|
|
state: started
|
|
|
|
- name: copy config files
|
|
ansible.builtin.copy:
|
|
src: config-files/apache/000-default.conf
|
|
dest: /etc/apache2/sites-available/000-default.conf
|
|
mode: '640'
|
|
become: true
|
|
|
|
- name: activate fastcgi
|
|
ansible.builtin.shell:
|
|
cmd: a2enmod fcgid
|
|
become: true
|
|
|
|
- name: install Kivi
|
|
hosts: "{{ target }}"
|
|
|
|
tasks:
|
|
- name: ensure git is installed
|
|
ansible.builtin.apt:
|
|
name: git
|
|
state: present
|
|
become: true
|
|
|
|
- name: clone repo
|
|
ansible.builtin.git:
|
|
repo: 'https://github.com/kivitendo/kivitendo-erp.git'
|
|
dest: /var/www/kivitendo-erp
|
|
version: release-3.8.0
|
|
become: true
|
|
|
|
- name: copy config files
|
|
ansible.builtin.copy:
|
|
src: config-files/kivitendo.conf
|
|
dest: /var/www/kivitendo-erp/config/kivitendo.conf
|
|
become: true
|
|
|
|
- name: make webdav directory
|
|
ansible.builtin.file:
|
|
path: /var/www/kivitendo-erp/webdav
|
|
state: directory
|
|
become: true
|
|
|
|
- name: change permissions
|
|
ansible.builtin.shell:
|
|
cmd: chown -R www-data users spool webdav
|
|
chdir: /var/www/kivitendo-erp
|
|
become: true
|
|
|
|
- name: restart apache
|
|
ansible.builtin.shell:
|
|
cmd: systemctl restart apache2
|
|
become: true
|