Explorar el Código

current project state

master
padre
commit
7f747e6b60
Se han modificado 8 ficheros con 106 adiciones y 0 borrados
  1. +1
    -0
      defaults/main.yaml
  2. +7
    -0
      tasks/access.yaml
  3. +6
    -0
      tasks/certificate.yaml
  4. +6
    -0
      tasks/main.yaml
  5. +26
    -0
      tasks/setup.yaml
  6. +20
    -0
      tasks/source.yaml
  7. +14
    -0
      tasks/vhost.yaml
  8. +26
    -0
      templates/apache-vhost.conf.j2

+ 1
- 0
defaults/main.yaml Ver fichero

@@ -1 +1,2 @@
---
kanboard_server_name: "{{ inventory_hostname }}"

+ 7
- 0
tasks/access.yaml Ver fichero

@@ -0,0 +1,7 @@
---

- name: kanboard data directory writable
file:
path: /var/www/kanboard/data
owner: www-data
group: www-data

+ 6
- 0
tasks/certificate.yaml Ver fichero

@@ -0,0 +1,6 @@
---

- include_role:
name: certificate
vars:
certificate_name: kanboard

+ 6
- 0
tasks/main.yaml Ver fichero

@@ -1 +1,7 @@
---

- import_tasks: setup.yaml
- import_tasks: source.yaml
- import_tasks: access.yaml
- import_tasks: certificate.yaml
- import_tasks: vhost.yaml

+ 26
- 0
tasks/setup.yaml Ver fichero

@@ -0,0 +1,26 @@
---

- import_role:
name: apache

- import_role:
name: php
vars:
php_configure_opcache: true

- name: debian packages
apt:
pkg:
- git
- php-pdo-sqlite
- php-pdo-mysql
- php-pdo-pgsql
- php-gd
- php-mbstring
- php-json
- php-ctype
- php-xml
- php-dom
- php-zip
- php-ldap
- php-curl

+ 20
- 0
tasks/source.yaml Ver fichero

@@ -0,0 +1,20 @@
---

- name: get kanboard releases
uri:
url: https://api.github.com/repos/kanboard/kanboard/releases
return_content: true
register: _kanboard_releases


- name: get latest kanboard release
uri:
url: https://api.github.com/repos/kanboard/kanboard/releases/latest
return_content: true
register: _kanboard_latest_release

- name: kanban repo
git:
repo: https://github.com/kanboard/kanboard.git
version: "{{ _kanboard_latest_release.json.tag_name }}"
dest: /var/www/kanboard

+ 14
- 0
tasks/vhost.yaml Ver fichero

@@ -0,0 +1,14 @@
---

- name: vhost
template:
src: apache-vhost.conf.j2
dest: /etc/apache2/sites-available/kanboard.conf
notify: reload apache

- name: vhost enabled
file:
src: ../sites-available/kanboard.conf
dest: /etc/apache2/sites-enabled/kanboard.conf
state: link
notify: reload apache

+ 26
- 0
templates/apache-vhost.conf.j2 Ver fichero

@@ -0,0 +1,26 @@
{{ ansible_managed | comment }}

<VirtualHost *:443>

ServerName {{kanboard_server_name}}

SSLEngine on
SSLCertificateFile "/etc/ssl/certs/kanboard.cert.pem"
SSLCertificateKeyFile "/etc/ssl/private/kanboard.key.pem"
{% if not certificate_provider == "selfsigned" %}
SSLCertificateChainFile "/etc/ssl/certs/kanboard.chain.pem"
{% endif %}

DocumentRoot /var/www/kanboard

<Directory /var/www/kanboard/>

Options +FollowSymlinks
AllowOverride All

</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Cargando…
Cancelar
Guardar