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_install_dir: "{{ koha_home_dir }}/koha"
|
||||||
koha_src_dir: "{{ koha_home_dir }}/Koha-{{ koha_version }}"
|
koha_src_dir: "{{ koha_home_dir }}/Koha-{{ koha_version }}"
|
||||||
koha_opac_hostname: koha.opendoor.fr
|
koha_opac_hostname: koha.opendoor.fr
|
||||||
|
koha_user: koha
|
||||||
koha_intranet_hostname: sigb.opendoor.fr
|
koha_intranet_hostname: sigb.opendoor.fr
|
||||||
koha_mariadb_server: localhost
|
koha_mariadb_server: localhost
|
||||||
koha_mariadb_user: "kohauser"
|
koha_mariadb_user: "kohauser"
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ koha_version: 21.05.07
|
|||||||
koha_home_dir: /home/koha
|
koha_home_dir: /home/koha
|
||||||
koha_install_dir: "{{ koha_home_dir }}/koha"
|
koha_install_dir: "{{ koha_home_dir }}/koha"
|
||||||
koha_src_dir: "{{ koha_home_dir }}/Koha-v{{ koha_version }}"
|
koha_src_dir: "{{ koha_home_dir }}/Koha-v{{ koha_version }}"
|
||||||
|
koha_user: koha
|
||||||
koha_opac_hostname: koha.opendoor.fr
|
koha_opac_hostname: koha.opendoor.fr
|
||||||
koha_intranet_hostname: sigb.opendoor.fr
|
koha_intranet_hostname: sigb.opendoor.fr
|
||||||
koha_mariadb_server: localhost
|
koha_mariadb_server: localhost
|
||||||
@@ -37,6 +38,7 @@ koha_packages:
|
|||||||
- libbusiness-issn-perl
|
- libbusiness-issn-perl
|
||||||
- libbytes-random-secure-perl
|
- libbytes-random-secure-perl
|
||||||
- libcache-memcached-fast-safe-perl
|
- libcache-memcached-fast-safe-perl
|
||||||
|
- libcache-memcached-fast-perl
|
||||||
- libcache-memcached-perl
|
- libcache-memcached-perl
|
||||||
- libcgi-compile-perl
|
- libcgi-compile-perl
|
||||||
- libcgi-emulate-psgi-perl
|
- libcgi-emulate-psgi-perl
|
||||||
@@ -182,6 +184,7 @@ koha_packages:
|
|||||||
- libyaml-libyaml-perl
|
- libyaml-libyaml-perl
|
||||||
- libyaml-syck-perl
|
- libyaml-syck-perl
|
||||||
- perl-doc
|
- perl-doc
|
||||||
|
- starman
|
||||||
- unzip
|
- unzip
|
||||||
- xmlstarlet
|
- xmlstarlet
|
||||||
- xsltproc
|
- xsltproc
|
||||||
|
|||||||
@@ -33,6 +33,6 @@
|
|||||||
- proxy_http
|
- proxy_http
|
||||||
- ssl
|
- ssl
|
||||||
- headers
|
- headers
|
||||||
- cgi
|
- cgid
|
||||||
notify: reload apache
|
notify: reload apache
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,23 @@
|
|||||||
# - assert:
|
# - assert:
|
||||||
# that: result.stat.exists is false
|
# that: result.stat.exists is false
|
||||||
|
|
||||||
|
- name: install prerequisites
|
||||||
|
tags: always
|
||||||
|
import_tasks: req.yml
|
||||||
|
|
||||||
- name: install memcached
|
- name: install memcached
|
||||||
import_tasks: memcached.yml
|
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
|
- name: create koha user
|
||||||
vars:
|
vars:
|
||||||
- kohapassword: $ANSIBLE_VAULT;1.1;AES256
|
- kohapassword: $ANSIBLE_VAULT;1.1;AES256
|
||||||
@@ -26,7 +40,7 @@
|
|||||||
name: koha
|
name: koha
|
||||||
home: "{{ koha_home_dir }}"
|
home: "{{ koha_home_dir }}"
|
||||||
create_home: yes
|
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
|
- name: get and extract archive
|
||||||
block:
|
block:
|
||||||
@@ -50,7 +64,6 @@
|
|||||||
name: "{{ koha_packages }}"
|
name: "{{ koha_packages }}"
|
||||||
|
|
||||||
- name: deploy Makefile
|
- name: deploy Makefile
|
||||||
tags: wip
|
|
||||||
template:
|
template:
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
dest: "{{ koha_src_dir }}"
|
dest: "{{ koha_src_dir }}"
|
||||||
@@ -61,7 +74,6 @@
|
|||||||
register: result
|
register: result
|
||||||
|
|
||||||
- name: make && & make install
|
- name: make && & make install
|
||||||
tags: wip
|
|
||||||
command: "{{ item }}"
|
command: "{{ item }}"
|
||||||
loop:
|
loop:
|
||||||
- make
|
- make
|
||||||
@@ -87,6 +99,11 @@
|
|||||||
dest: /var/log/koha
|
dest: /var/log/koha
|
||||||
state: link
|
state: link
|
||||||
|
|
||||||
|
- name: configure log rotation
|
||||||
|
template:
|
||||||
|
src: logrotate.koha
|
||||||
|
dest: /etc/logrotate.d/koha
|
||||||
|
|
||||||
- name: configure apache
|
- name: configure apache
|
||||||
import_tasks: apache.yml
|
import_tasks: apache.yml
|
||||||
tags: apache
|
tags: apache
|
||||||
@@ -96,14 +113,6 @@
|
|||||||
tags: plack
|
tags: plack
|
||||||
|
|
||||||
|
|
||||||
- name: add fr translation
|
|
||||||
command: perl translate install fr-FR
|
|
||||||
args:
|
|
||||||
chdir: "{{ koha_install_dir }}/misc/translator/"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: fix permissions
|
- name: fix permissions
|
||||||
file:
|
file:
|
||||||
path: "{{ koha_install_dir }}"
|
path: "{{ koha_install_dir }}"
|
||||||
@@ -123,10 +132,10 @@
|
|||||||
- "{{ koha_install_dir }}/var/log"
|
- "{{ koha_install_dir }}/var/log"
|
||||||
- "{{ koha_install_dir }}/var/run"
|
- "{{ 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]
|
[Service]
|
||||||
Environment="KOHA_CONF={{ koha_install_dir }}/etc/koha-conf.xml"
|
Environment="KOHA_CONF={{ koha_install_dir }}/etc/koha-conf.xml"
|
||||||
Environment="PERL5LIB={{ koha_install_dir }}/lib"
|
Environment="PERL5LIB={{ koha_install_dir }}/lib"
|
||||||
KOHA_HOME={{ koha_install_dir }}
|
Environment="KOHA_HOME={{ koha_install_dir }}"
|
||||||
Type=forking
|
Type=forking
|
||||||
User=root
|
User=root
|
||||||
ExecStart={{ koha_install_dir }}/bin/plack/koha-plack --start foobar
|
ExecStart={{ koha_install_dir }}/bin/plack/koha-plack --start foobar
|
||||||
|
|||||||
Reference in New Issue
Block a user