1st shot: install memcached, download and extract archive, make and make install

This commit is contained in:
2021-12-06 14:26:48 +01:00
parent cdea82b922
commit 1cbd649a78
11 changed files with 19338 additions and 3 deletions

View File

@@ -1,2 +1,93 @@
---
# tasks file for tco.koha
# tasks file for tco.koha
#- name: exit if install dir exists
# block:
# - stat:
# path: "{{ koha_install_dir }}"
# register: result
# ignore_errors: true
#
# - assert:
# that: result.stat.exists is false
- name: install memcached
import_tasks: memcached.yml
tags: wip
- name: create koha user
vars:
- kohapassword: $ANSIBLE_VAULT;1.1;AES256
32343335656665373331343735333266383165643665373336363830613466623734636466623139
6434316465653862346136333665636434373036643131620a646436626537666438313837383436
61306561346334333661373664353235343562323636316562363934343739626634626161356433
6333363164313030340a336430326334613435333161656435373962316266333765326462393238
6237
user:
name: koha
home: "{{ koha_home_dir }}"
create_home: yes
password: "{{ kohapassword | password_hash('sha512', ansible_hostname )}}"
- name: get and extract archive
block:
- get_url:
url: "https://github.com/Koha-Community/Koha/archive/refs/tags/v{{ koha_version }}.tar.gz"
dest: /tmp/
- unarchive:
src: /tmp/Koha-{{ koha_version }}.tar.gz
remote_src: yes
dest: "{{ koha_home_dir }}"
# - file:
# state: link
# dest: "{{ koha_install_dir }}"
# src: "{{ koha_home_dir }}/Koha-{{ koha_version }}"
- name: install required packages
apt:
state: present
name: "{{ koha_packages }}"
- name: deploy Makefile
tags: wip
template:
src: "{{ item }}"
dest: "{{ koha_src_dir }}"
loop:
- Makefile
- MYMETA.json
- MYMETA.yml
- name: make && & make install
tags: wip
command: "{{ item }}"
loop:
- make
- make install
args:
chdir: "{{ koha_src_dir }}"
- name: configure environment
template:
src: koha.env.sh
dest: /etc/profile.d/
- name: create etc symlink
file:
src: "{{ koha_install_dir }}/etc"
dest: /etc/koha
state: link
- name: configure apache
template:
src:
dest: /etc/apache/sites-enabled/
notify: reload apache
loop:
- apache-intranet.conf
- apache-opac.conf

9
tasks/memcached.yml Normal file
View File

@@ -0,0 +1,9 @@
---
- apt:
name: memcached
state: present
- service:
name: memcached
enabled: true
state: started