mise au point, separation spec iep dans role separé
This commit is contained in:
@@ -19,6 +19,7 @@ koha_home_dir: /home/koha
|
||||
koha_install_dir: "{{ koha_home_dir }}/koha"
|
||||
koha_src_dir: "{{ koha_home_dir }}/Koha-{{ koha_version }}"
|
||||
koha_opac_hostname: koha.opendoor.fr
|
||||
koha_user: koha
|
||||
koha_intranet_hostname: sigb.opendoor.fr
|
||||
koha_mariadb_server: localhost
|
||||
koha_mariadb_user: "kohauser"
|
||||
|
||||
@@ -5,6 +5,7 @@ koha_version: 21.05.07
|
||||
koha_home_dir: /home/koha
|
||||
koha_install_dir: "{{ koha_home_dir }}/koha"
|
||||
koha_src_dir: "{{ koha_home_dir }}/Koha-v{{ koha_version }}"
|
||||
koha_user: koha
|
||||
koha_opac_hostname: koha.opendoor.fr
|
||||
koha_intranet_hostname: sigb.opendoor.fr
|
||||
koha_mariadb_server: localhost
|
||||
@@ -37,6 +38,7 @@ koha_packages:
|
||||
- libbusiness-issn-perl
|
||||
- libbytes-random-secure-perl
|
||||
- libcache-memcached-fast-safe-perl
|
||||
- libcache-memcached-fast-perl
|
||||
- libcache-memcached-perl
|
||||
- libcgi-compile-perl
|
||||
- libcgi-emulate-psgi-perl
|
||||
@@ -182,6 +184,7 @@ koha_packages:
|
||||
- libyaml-libyaml-perl
|
||||
- libyaml-syck-perl
|
||||
- perl-doc
|
||||
- starman
|
||||
- unzip
|
||||
- xmlstarlet
|
||||
- xsltproc
|
||||
|
||||
@@ -33,6 +33,6 @@
|
||||
- proxy_http
|
||||
- ssl
|
||||
- headers
|
||||
- cgi
|
||||
- cgid
|
||||
notify: reload apache
|
||||
|
||||
|
||||
@@ -11,9 +11,23 @@
|
||||
# - assert:
|
||||
# that: result.stat.exists is false
|
||||
|
||||
- name: install prerequisites
|
||||
tags: always
|
||||
import_tasks: req.yml
|
||||
|
||||
- name: install memcached
|
||||
import_tasks: memcached.yml
|
||||
|
||||
- name: configure koha repo for dependencies
|
||||
block:
|
||||
- apt_key:
|
||||
url: https://debian.koha-community.org/koha/gpg.asc
|
||||
state: present
|
||||
- apt_repository:
|
||||
filename: koha
|
||||
repo: "deb http://debian.koha-community.org/koha stable main"
|
||||
state: present
|
||||
|
||||
- name: create koha user
|
||||
vars:
|
||||
- kohapassword: $ANSIBLE_VAULT;1.1;AES256
|
||||
@@ -26,7 +40,7 @@
|
||||
name: koha
|
||||
home: "{{ koha_home_dir }}"
|
||||
create_home: yes
|
||||
password: "{{ kohapassword | password_hash('sha512', ansible_hostname )}}"
|
||||
password: "{{ kohapassword | password_hash('sha512',123456 | random( seed=ansible_hostname )|string)}}"
|
||||
|
||||
- name: get and extract archive
|
||||
block:
|
||||
@@ -50,7 +64,6 @@
|
||||
name: "{{ koha_packages }}"
|
||||
|
||||
- name: deploy Makefile
|
||||
tags: wip
|
||||
template:
|
||||
src: "{{ item }}"
|
||||
dest: "{{ koha_src_dir }}"
|
||||
@@ -61,7 +74,6 @@
|
||||
register: result
|
||||
|
||||
- name: make && & make install
|
||||
tags: wip
|
||||
command: "{{ item }}"
|
||||
loop:
|
||||
- make
|
||||
@@ -87,6 +99,11 @@
|
||||
dest: /var/log/koha
|
||||
state: link
|
||||
|
||||
- name: configure log rotation
|
||||
template:
|
||||
src: logrotate.koha
|
||||
dest: /etc/logrotate.d/koha
|
||||
|
||||
- name: configure apache
|
||||
import_tasks: apache.yml
|
||||
tags: apache
|
||||
@@ -96,14 +113,6 @@
|
||||
tags: plack
|
||||
|
||||
|
||||
- name: add fr translation
|
||||
command: perl translate install fr-FR
|
||||
args:
|
||||
chdir: "{{ koha_install_dir }}/misc/translator/"
|
||||
|
||||
|
||||
|
||||
|
||||
- name: fix permissions
|
||||
file:
|
||||
path: "{{ koha_install_dir }}"
|
||||
@@ -123,10 +132,10 @@
|
||||
- "{{ koha_install_dir }}/var/log"
|
||||
- "{{ koha_install_dir }}/var/run"
|
||||
|
||||
# cronjob
|
||||
# # zebra
|
||||
# traduction
|
||||
# cronjob
|
||||
# # zebra
|
||||
# traduction
|
||||
|
||||
# cronjob
|
||||
# # zebra
|
||||
# traduction
|
||||
# cronjob
|
||||
# # zebra
|
||||
# traduction
|
||||
|
||||
7
tasks/req.yml
Normal file
7
tasks/req.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: install mandatory packages
|
||||
package:
|
||||
state: present
|
||||
name:
|
||||
- git
|
||||
|
||||
15
templates/logrotate.koha
Normal file
15
templates/logrotate.koha
Normal file
@@ -0,0 +1,15 @@
|
||||
# Rotate log files for all Koha instances.
|
||||
|
||||
{{ koha_install_dir }}/var/log/*log {
|
||||
rotate 5
|
||||
weekly
|
||||
missingok
|
||||
compress
|
||||
delaycompress
|
||||
notifempty
|
||||
sharedscripts
|
||||
postrotate
|
||||
/bin/systemctl restart plack.service zebrasrv.service koha-sip
|
||||
endscript
|
||||
|
||||
}
|
||||
@@ -5,7 +5,7 @@ After=network.target remote-fs.target nss-lookup.target
|
||||
[Service]
|
||||
Environment="KOHA_CONF={{ koha_install_dir }}/etc/koha-conf.xml"
|
||||
Environment="PERL5LIB={{ koha_install_dir }}/lib"
|
||||
KOHA_HOME={{ koha_install_dir }}
|
||||
Environment="KOHA_HOME={{ koha_install_dir }}"
|
||||
Type=forking
|
||||
User=root
|
||||
ExecStart={{ koha_install_dir }}/bin/plack/koha-plack --start foobar
|
||||
|
||||
Reference in New Issue
Block a user