mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-16 10:13:26 +02:00
Update to 2022-01-29 13:00
This commit is contained in:
parent
f45491ce0b
commit
013c387bca
@ -1,7 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
# Version to deploy
|
|
||||||
taiga_version: 6.5.0
|
|
||||||
# Should ansible handle upgrades ? If False, only the initial install will be done
|
# Should ansible handle upgrades ? If False, only the initial install will be done
|
||||||
taiga_manage_upgrade: True
|
taiga_manage_upgrade: True
|
||||||
# Where taiga will be installed
|
# Where taiga will be installed
|
||||||
@ -9,20 +7,24 @@ taiga_root_dir: /opt/taiga
|
|||||||
# User under which taiga will run (will be created)
|
# User under which taiga will run (will be created)
|
||||||
taiga_user: taiga
|
taiga_user: taiga
|
||||||
|
|
||||||
# Archive URL and expected checksum
|
# Archives URL, versions and expected checksums
|
||||||
taiga_archives:
|
taiga_archives:
|
||||||
back:
|
back:
|
||||||
url: https://github.com/kaleidos-ventures/taiga-back/archive/refs/tags/{{ taiga_version }}.tar.gz
|
version: 6.5.1
|
||||||
sha256: aa68e689a0095a1726869291eb8bcfe82e828d51188ed4a9eb797ed9a664aa0c
|
url: https://github.com/kaleidos-ventures/taiga-back/archive/refs/tags/6.5.1.tar.gz
|
||||||
|
sha256: aa3602693835f5891d8ff5b7750027a059c9bf2d49e38fcb92c18f6ddb5e9b72
|
||||||
front:
|
front:
|
||||||
url: https://github.com/kaleidos-ventures/taiga-front-dist/archive/refs/tags/{{ taiga_version }}.tar.gz
|
version: 6.5.1
|
||||||
sha256: 1d2595b32346eeef1796db85d1c5701258e0c038be2bab9e86c0c7d6f99b034b
|
url: https://github.com/kaleidos-ventures/taiga-front-dist/archive/refs/tags/6.5.1.tar.gz
|
||||||
dir: taiga-front-dist-{{ taiga_version }}
|
sha256: b8c0ea77b06f1c256b2f0b7b4b14af1173c6ba5bad67aad278e54ce897183613
|
||||||
|
dir: taiga-front-dist-6.5.1
|
||||||
events:
|
events:
|
||||||
url: https://github.com/kaleidos-ventures/taiga-events/archive/refs/tags/{{ taiga_version }}.tar.gz
|
version: 6.5.0
|
||||||
|
url: https://github.com/kaleidos-ventures/taiga-events/archive/refs/tags/6.5.0.tar.gz
|
||||||
sha256: c6307e1246b97a2aa7f53755dbceb98b24256badf8282b37b8a24b51d08b583f
|
sha256: c6307e1246b97a2aa7f53755dbceb98b24256badf8282b37b8a24b51d08b583f
|
||||||
protected:
|
protected:
|
||||||
url: https://github.com/kaleidos-ventures/taiga-protected/archive/refs/tags/{{ taiga_version }}.tar.gz
|
version: 6.5.0
|
||||||
|
url: https://github.com/kaleidos-ventures/taiga-protected/archive/refs/tags/6.5.0.tar.gz
|
||||||
sha256: 8465eaf078dee7b61f4fd5dbb216db94ea455b3c8d69c19c10ae33ff481e46f0
|
sha256: 8465eaf078dee7b61f4fd5dbb216db94ea455b3c8d69c19c10ae33ff481e46f0
|
||||||
|
|
||||||
# Database settings
|
# Database settings
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Compress previous version
|
- name: Compress previous version
|
||||||
command: tar cf {{ taiga_root_dir }}/archives/{{ taiga_current_version }}.tar.zst --use-compress-program=zstd ./
|
command: tar cf {{ taiga_root_dir }}/archives/{{ taiga_archive_dir }}.tar.zst --use-compress-program=zstd ./
|
||||||
args:
|
args:
|
||||||
chdir: "{{ taiga_root_dir }}/archives/{{ taiga_current_version }}"
|
chdir: "{{ taiga_root_dir }}/archives/{{ taiga_archive_dir }}"
|
||||||
warn: False
|
warn: False
|
||||||
environment:
|
environment:
|
||||||
ZSTD_CLEVEL: 10
|
ZSTD_CLEVEL: 10
|
||||||
|
ZSTD_NBTHREADS: 0
|
||||||
tags: taiga
|
tags: taiga
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
|
- name: Set archive dir name
|
||||||
|
set_fact: taiga_archive_dir=back_{{ taiga_version_back }}-front_{{ taiga_version_front }}-events_{{ taiga_version_events }}-protected_{{ taiga_version_protected }}
|
||||||
|
tags: taiga
|
||||||
|
|
||||||
- name: Create the archive dir
|
- name: Create the archive dir
|
||||||
file: path={{ taiga_root_dir }}/archives/{{ taiga_current_version }} state=directory
|
file: path={{ taiga_root_dir }}/archives/{{ taiga_archive_dir }} state=directory
|
||||||
tags: taiga
|
tags: taiga
|
||||||
|
|
||||||
- name: Install postgresql client
|
- name: Install postgresql client
|
||||||
@ -23,7 +27,7 @@
|
|||||||
- name: Archive previous version
|
- name: Archive previous version
|
||||||
synchronize:
|
synchronize:
|
||||||
src: "{{ taiga_root_dir }}/{{ item }}"
|
src: "{{ taiga_root_dir }}/{{ item }}"
|
||||||
dest: "{{ taiga_root_dir }}/archives/{{ taiga_current_version }}/"
|
dest: "{{ taiga_root_dir }}/archives/{{ taiga_archive_dir }}/"
|
||||||
recursive: True
|
recursive: True
|
||||||
delete: True
|
delete: True
|
||||||
compress: False
|
compress: False
|
||||||
@ -41,7 +45,7 @@
|
|||||||
--host={{ taiga_db_server | quote }}
|
--host={{ taiga_db_server | quote }}
|
||||||
--port={{ taiga_db_port | quote }}
|
--port={{ taiga_db_port | quote }}
|
||||||
--username={{ taiga_db_user | quote }} {{ taiga_db_name | quote }}
|
--username={{ taiga_db_user | quote }} {{ taiga_db_name | quote }}
|
||||||
--file="{{ taiga_root_dir }}/archives/{{ taiga_current_version }}/{{ taiga_db_name }}.sql"
|
--file="{{ taiga_root_dir }}/archives/{{ taiga_archive_dir }}/{{ taiga_db_name }}.sql"
|
||||||
environment:
|
environment:
|
||||||
- PGPASSWORD: "{{ taiga_db_pass }}"
|
- PGPASSWORD: "{{ taiga_db_pass }}"
|
||||||
tags: taiga
|
tags: taiga
|
||||||
|
@ -3,13 +3,17 @@
|
|||||||
- name: Remove tmp and obsolete files
|
- name: Remove tmp and obsolete files
|
||||||
file: path={{ item }} state=absent
|
file: path={{ item }} state=absent
|
||||||
loop:
|
loop:
|
||||||
- "{{ taiga_root_dir }}/tmp/taiga-back-{{ taiga_version }}.tar.gz"
|
- "{{ taiga_root_dir }}/tmp/taiga-back-{{ taiga_archives['back'].version }}.tar.gz"
|
||||||
- "{{ taiga_root_dir }}/tmp/taiga-back-{{ taiga_version }}"
|
- "{{ taiga_root_dir }}/tmp/taiga-back-{{ taiga_archives['back'].version }}"
|
||||||
- "{{ taiga_root_dir }}/tmp/taiga-front-dist-{{ taiga_version }}.tar.gz"
|
- "{{ taiga_root_dir }}/tmp/taiga-front-dist-{{ taiga_archives['front'].version }}.tar.gz"
|
||||||
- "{{ taiga_root_dir }}/tmp/taiga-front-dist-{{ taiga_version }}"
|
- "{{ taiga_root_dir }}/tmp/taiga-front-dist-{{ taiga_archives['front'].version }}"
|
||||||
- "{{ taiga_root_dir }}/tmp/taiga-events-{{ taiga_version }}.tar.gz"
|
- "{{ taiga_root_dir }}/tmp/taiga-events-{{ taiga_archives['events'].version }}.tar.gz"
|
||||||
- "{{ taiga_root_dir }}/tmp/taiga-events-{{ taiga_version }}"
|
- "{{ taiga_root_dir }}/tmp/taiga-events-{{ taiga_archives['events'].version }}"
|
||||||
- "{{ taiga_root_dir }}/tmp/taiga-protected-{{ taiga_version }}.tar.gz"
|
- "{{ taiga_root_dir }}/tmp/taiga-protected-{{ taiga_archives['protected'].version }}.tar.gz"
|
||||||
- "{{ taiga_root_dir }}/tmp/taiga-protected-{{ taiga_version }}"
|
- "{{ taiga_root_dir }}/tmp/taiga-protected-{{ taiga_archives['protected'].version }}"
|
||||||
- "{{ taiga_root_dir }}/archives/{{ taiga_current_version }}"
|
tags: taiga
|
||||||
|
|
||||||
|
- name: Remove archive dir
|
||||||
|
file: path={{ taiga_root_dir }}/archives/{{ taiga_archive_dir }} state=absent
|
||||||
|
when: taiga_archive_dir is defined
|
||||||
tags: taiga
|
tags: taiga
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
virtualenv: "{{ taiga_root_dir }}/venv"
|
virtualenv: "{{ taiga_root_dir }}/venv"
|
||||||
|
|
||||||
- name: Set permissions for nginx
|
- name: Set permissions for nginx
|
||||||
command: |
|
shell: |
|
||||||
setfacl -R -k -b {{ taiga_root_dir }}
|
setfacl -R -k -b {{ taiga_root_dir }}
|
||||||
setfacl -m u:nginx:x {{ taiga_root_dir }}
|
setfacl -m u:nginx:x {{ taiga_root_dir }}
|
||||||
setfacl -m u:nginx:x {{ taiga_root_dir }}/data
|
setfacl -m u:nginx:x {{ taiga_root_dir }}/data
|
||||||
|
@ -4,9 +4,6 @@
|
|||||||
file: path={{ item.dir }} state=directory owner={{ item.owner | default(omit) }} group={{ item.group | default(omit) }} mode={{ item.mode | default(omit) }}
|
file: path={{ item.dir }} state=directory owner={{ item.owner | default(omit) }} group={{ item.group | default(omit) }} mode={{ item.mode | default(omit) }}
|
||||||
loop:
|
loop:
|
||||||
- dir: "{{ taiga_root_dir }}"
|
- dir: "{{ taiga_root_dir }}"
|
||||||
owner: "{{ taiga_user }}"
|
|
||||||
group: "{{ taiga_user }}"
|
|
||||||
mode: 750
|
|
||||||
- dir: "{{ taiga_root_dir }}/backup"
|
- dir: "{{ taiga_root_dir }}/backup"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
@ -30,5 +27,4 @@
|
|||||||
- dir: "{{ taiga_root_dir }}/data/media"
|
- dir: "{{ taiga_root_dir }}/data/media"
|
||||||
owner: "{{ taiga_user }}"
|
owner: "{{ taiga_user }}"
|
||||||
group: "{{ taiga_user }}"
|
group: "{{ taiga_user }}"
|
||||||
mode: 750
|
|
||||||
tags: taiga
|
tags: taiga
|
||||||
|
@ -9,14 +9,52 @@
|
|||||||
- "{{ role_path }}/vars/{{ ansible_os_family }}.yml"
|
- "{{ role_path }}/vars/{{ ansible_os_family }}.yml"
|
||||||
tags: taiga
|
tags: taiga
|
||||||
|
|
||||||
# Detect installed version (if any)
|
# Detect installed version (if any), and decide if ansible should install/upgrade
|
||||||
|
- set_fact: taiga_install_mode='none'
|
||||||
|
tags: taiga
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- import_tasks: ../includes/webapps_set_install_mode.yml
|
- import_tasks: ../includes/webapps_set_install_mode.yml
|
||||||
vars:
|
vars:
|
||||||
- root_dir: "{{ taiga_root_dir }}"
|
- root_dir: "{{ taiga_root_dir }}"
|
||||||
- version: "{{ taiga_version }}"
|
- version: "{{ taiga_archives['back'].version }}"
|
||||||
|
- version_file: ansible_version_back
|
||||||
- set_fact: taiga_install_mode={{ (install_mode == 'upgrade' and not taiga_manage_upgrade) | ternary('none',install_mode) }}
|
- set_fact: taiga_install_mode={{ (install_mode == 'upgrade' and not taiga_manage_upgrade) | ternary('none',install_mode) }}
|
||||||
- set_fact: taiga_current_version={{ current_version | default('') }}
|
when: taiga_install_mode == 'none'
|
||||||
|
- set_fact: taiga_version_back={{ current_version }}
|
||||||
|
tags: taiga
|
||||||
|
|
||||||
|
- block:
|
||||||
|
- import_tasks: ../includes/webapps_set_install_mode.yml
|
||||||
|
vars:
|
||||||
|
- root_dir: "{{ taiga_root_dir }}"
|
||||||
|
- version: "{{ taiga_archives['front'].version }}"
|
||||||
|
- version_file: ansible_version_front
|
||||||
|
- set_fact: taiga_install_mode={{ (install_mode == 'upgrade' and not taiga_manage_upgrade) | ternary('none',install_mode) }}
|
||||||
|
when: taiga_install_mode == 'none'
|
||||||
|
- set_fact: taiga_version_front={{ current_version }}
|
||||||
|
tags: taiga
|
||||||
|
|
||||||
|
- block:
|
||||||
|
- import_tasks: ../includes/webapps_set_install_mode.yml
|
||||||
|
vars:
|
||||||
|
- root_dir: "{{ taiga_root_dir }}"
|
||||||
|
- version: "{{ taiga_archives['events'].version }}"
|
||||||
|
- version_file: ansible_version_events
|
||||||
|
- set_fact: taiga_install_mode={{ (install_mode == 'upgrade' and not taiga_manage_upgrade) | ternary('none',install_mode) }}
|
||||||
|
when: taiga_install_mode == 'none'
|
||||||
|
- set_fact: taiga_version_events={{ current_version }}
|
||||||
|
tags: taiga
|
||||||
|
|
||||||
|
- block:
|
||||||
|
- import_tasks: ../includes/webapps_set_install_mode.yml
|
||||||
|
vars:
|
||||||
|
- root_dir: "{{ taiga_root_dir }}"
|
||||||
|
- version: "{{ taiga_archives['protected'].version }}"
|
||||||
|
- version_file: ansible_version_protected
|
||||||
|
- set_fact: taiga_install_mode={{ (install_mode == 'upgrade' and not taiga_manage_upgrade) | ternary('none',install_mode) }}
|
||||||
|
when: taiga_install_mode == 'none'
|
||||||
|
- set_fact: taiga_version_protected={{ current_version }}
|
||||||
tags: taiga
|
tags: taiga
|
||||||
|
|
||||||
# Generate a password for the database if needed
|
# Generate a password for the database if needed
|
||||||
|
@ -19,14 +19,14 @@
|
|||||||
|
|
||||||
- name: Extract archives
|
- name: Extract archives
|
||||||
unarchive:
|
unarchive:
|
||||||
src: "{{ taiga_root_dir }}/tmp/{{ taiga_archives[item].dir | default('taiga-' ~ item ~ '-' ~ taiga_version) }}.tar.gz"
|
src: "{{ taiga_root_dir }}/tmp/{{ taiga_archives[item].dir | default('taiga-' ~ item ~ '-' ~ taiga_archives[item].version) }}.tar.gz"
|
||||||
dest: "{{ taiga_root_dir }}/tmp"
|
dest: "{{ taiga_root_dir }}/tmp"
|
||||||
remote_src: True
|
remote_src: True
|
||||||
loop: "{{ taiga_archives.keys() | list }}"
|
loop: "{{ taiga_archives.keys() | list }}"
|
||||||
|
|
||||||
- name: Move components to their final dir
|
- name: Move components to their final dir
|
||||||
synchronize:
|
synchronize:
|
||||||
src: "{{ taiga_root_dir }}/tmp/{{ taiga_archives[item].dir | default('taiga-' ~ item ~ '-' ~ taiga_version) }}/"
|
src: "{{ taiga_root_dir }}/tmp/{{ taiga_archives[item].dir | default('taiga-' ~ item ~ '-' ~ taiga_archives[item].version) }}/"
|
||||||
dest: "{{ taiga_root_dir }}/app/{{ item }}/"
|
dest: "{{ taiga_root_dir }}/app/{{ item }}/"
|
||||||
delete: True
|
delete: True
|
||||||
compress: False
|
compress: False
|
||||||
@ -68,7 +68,7 @@
|
|||||||
file: path={{ taiga_root_dir }}/app/front/dist/plugins/ state=directory
|
file: path={{ taiga_root_dir }}/app/front/dist/plugins/ state=directory
|
||||||
|
|
||||||
- name: Install the openid-auth front plugin
|
- name: Install the openid-auth front plugin
|
||||||
copy: src={{ taiga_root_dir }}/tmp/taiga-contrib-openid-auth/front/dist/ dest={{ taiga_root_dir }}/app/front/dist/plugins/openid-auth/ remote_src=True
|
copy: src={{ taiga_root_dir }}/app/back/taiga-contrib-openid-auth/front/dist/ dest={{ taiga_root_dir }}/app/front/dist/plugins/openid-auth/ remote_src=True
|
||||||
|
|
||||||
- name: Install dependencies for taiga-events
|
- name: Install dependencies for taiga-events
|
||||||
npm:
|
npm:
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Write installed version
|
- name: Write installed version
|
||||||
copy: content={{ taiga_version }} dest={{ taiga_root_dir }}/meta/ansible_version
|
copy: content={{ taiga_archives[item].version }} dest={{ taiga_root_dir }}/meta/ansible_version_{{ item }}
|
||||||
|
loop: "{{ taiga_archives.keys() | list }}"
|
||||||
tags: taiga
|
tags: taiga
|
||||||
|
Loading…
x
Reference in New Issue
Block a user