forked from tilde-fr/infra
79 lines
1.8 KiB
YAML
79 lines
1.8 KiB
YAML
# Install apache and accoutrements www, irrespective of what role they might have
|
|
---
|
|
- name: Install packages for webserver
|
|
apt:
|
|
name: "{{ packages }}"
|
|
state: present
|
|
update_cache: yes
|
|
vars:
|
|
packages:
|
|
- nginx
|
|
- php-fpm
|
|
- php-curl
|
|
- php-gd
|
|
- php-intl
|
|
- php-sqlite3
|
|
- php-mbstring
|
|
|
|
# Malheureusement zola compile pas sur debian buster (rustc v1.34 contre 1.36 requis)
|
|
# Donc on copie un binaire que j'ai compilé avec amour
|
|
- name: Installer le générateur de site statique zola
|
|
copy:
|
|
src: ../files/bin/zola
|
|
dest: /usr/local/bin/zola
|
|
|
|
# - stat:
|
|
# path: /usr/local/bin/zola
|
|
# register: zola
|
|
#
|
|
# - name: Télécharger la source de zola
|
|
# git:
|
|
# dest: /tmp/zola
|
|
# repo: https://github.com/getzola/zola
|
|
# version: "v0.10.1"
|
|
# when: not zola.stat.exists
|
|
#
|
|
# Zola a besoin de make, g++, libssl-dev et libsass-dev qui sont installés dans main.yml
|
|
#
|
|
# - name: Compiler zola
|
|
# command: "cargo install --path /tmp/zola"
|
|
# when: not zola.stat.exists
|
|
#
|
|
# - name: Supprimer les fichiers temporaires de zola
|
|
# file:
|
|
# path: /tmp/zola
|
|
# state: absent
|
|
# when: not zola.stat.exists
|
|
|
|
|
|
- stat:
|
|
path: /usr/local/bin/ttbp
|
|
register: ttbp
|
|
|
|
- name: Télécharger la source de ttbp
|
|
git:
|
|
repo: https://tildegit.org/envs/ttbp.git
|
|
dest: /tmp/ttbp
|
|
when: not ttbp.stat.exists
|
|
|
|
- name: ttbp a des dépendances non installées dans main.yml
|
|
apt:
|
|
name: "{{ packages }}"
|
|
state: present
|
|
update_cache: yes
|
|
vars:
|
|
packages:
|
|
- python-setuptools
|
|
|
|
- name: Compiler ttbp
|
|
command:
|
|
cmd: "python /tmp/ttbp/setup.py install"
|
|
chdir: /tmp/ttbp
|
|
when: not ttbp.stat.exists
|
|
|
|
- name: Supprimer les fichiers temporaires de ttbp
|
|
file:
|
|
path: /tmp/ttbp
|
|
state: absent
|
|
when: not ttbp.stat.exists
|