Update to 2020-05-11 13:00

master
Daniel Berteaud 5 years ago
parent 9304c2a1e5
commit b1ca10dbba
  1. 1
      roles/docker/defaults/main.yml
  2. 1
      roles/docker/meta/main.yml
  3. 9
      roles/docker/tasks/install_RedHat.yml
  4. 3
      roles/docker_compose/defaults/main.yml
  5. 10
      roles/docker_compose/tasks/main.yml
  6. 5
      roles/seafile/tasks/cleanup.yml
  7. 2
      roles/seafile/tasks/directories.yml
  8. 2
      roles/seafile/tasks/install.yml
  9. 13
      roles/seafile/templates/seafile_dump_db.sh.j2
  10. 2
      roles/seafile/templates/seafile_rm_dumps.sh.j2

@ -16,3 +16,4 @@ docker_extra_conf: {}
# max-file: 5 # max-file: 5
docker_conf: "{{ docker_base_conf | combine(docker_extra_conf, recursive=True) }}" docker_conf: "{{ docker_base_conf | combine(docker_extra_conf, recursive=True) }}"

@ -2,3 +2,4 @@
dependencies: dependencies:
- role: repo_docker - role: repo_docker
- role: docker_compose

@ -5,8 +5,15 @@
name: name:
- docker-ce - docker-ce
- docker-ce-cli - docker-ce-cli
- docker-compose
- device-mapper-persistent-data - device-mapper-persistent-data
- lvm2 - lvm2
state: present state: present
tags: docker tags: docker
- name: Remove packaged docker-compose
yum:
name:
- docker-compose
state: absent
tags: docker

@ -0,0 +1,3 @@
---
docker_compose_version: 1.25.5

@ -0,0 +1,10 @@
---
- name: Install docker-compose
get_url:
url: https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-Linux-x86_64
dest: /usr/local/bin/docker-compose
mode: 0755
environment:
- https_proxy: "{{ system_proxy | default('') }}"
tags: docker

@ -1,6 +1,6 @@
--- ---
- name: Remove tmp files - name: Remove tmp and obsolete files
file: path={{ item }} state=absent file: path={{ item }} state=absent
with_items: with_items:
- "{{ seafile_root_dir }}/tmp/seafile-server_{{ seafile_version }}_x86-64.tar.gz" - "{{ seafile_root_dir }}/tmp/seafile-server_{{ seafile_version }}_x86-64.tar.gz"
@ -8,5 +8,6 @@
- "{{ seafile_root_dir }}/tmp/seafile-pro-server_{{ seafile_version }}_x86-64_CentOS.tar.gz" - "{{ seafile_root_dir }}/tmp/seafile-pro-server_{{ seafile_version }}_x86-64_CentOS.tar.gz"
- "{{ seafile_root_dir }}/tmp/seafile-pro-server-{{ seafile_version }}" - "{{ seafile_root_dir }}/tmp/seafile-pro-server-{{ seafile_version }}"
- /etc/cron.d/seafil_gc - /etc/cron.d/seafil_gc
- "{{ seafile_root_dir }}/db_dumps" - "{{ seafile_data_dir }}/db_dumps"
- "{{ seafile_data_dir }}/backup"
tags: seafile tags: seafile

@ -29,7 +29,7 @@
owner: "{{ seafile_user }}" owner: "{{ seafile_user }}"
group: "{{ seafile_user }}" group: "{{ seafile_user }}"
- dir: "{{ seafile_data_dir }}/pro" - dir: "{{ seafile_data_dir }}/pro"
- dir: "{{ seafile_data_dir }}/backup" - dir: "{{ seafile_root_dir }}/backup"
mode: 700 mode: 700
owner: root owner: root
group: root group: root

@ -101,7 +101,7 @@
tags: seafile tags: seafile
- name: Chown seafile install dir - name: Chown seafile install dir
command: chown -R {{ seafile_user }}:{{ seafile_group }} {{ seafile_root_dir }}/seafile-server/* shell: chown -R {{ seafile_user }}:{{ seafile_group }} {{ seafile_root_dir }}/seafile-server/*
args: args:
warn: False warn: False
when: seafile_install_mode != 'none' when: seafile_install_mode != 'none'

@ -1,9 +1,12 @@
#!/bin/sh #!/bin/sh
for DB in {{ seafile_db_ccnet }} {{ seafile_db_seafile }} {{ seafile_db_seahub }}; do for DB in {{ seafile_db_ccnet }} {{ seafile_db_seafile }} {{ seafile_db_seahub }}; do
/usr/bin/mysqldump --user={{ seafile_db_user }} \ /usr/bin/mysqldump \
--password={{ seafile_db_pass }} \ --quick --single-transaction \
--host={{ seafile_db_server }} \ {% if seafile_db_server not in ['127.0.0.1', 'localhost'] %}
--quick --single-transaction \ --user='{{ seafile_db_user }}' \
--add-drop-table $DB | zstd -T0 -c > {{ seafile_data_dir }}/backup/$DB.sql.zst --password='{{ seafile_db_pass }}' \
--host={{ seafile_db_server }} \
{% endif %}
--add-drop-table $DB | zstd -T0 -c > {{ seafile_root_dir }}/backup/$DB.sql.zst
done done

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
rm -f {{ seafile_data_dir }}/backup/* rm -f {{ seafile_root_dir }}/backup/*

Loading…
Cancel
Save