Merge branch 'master' into make-etherpad-great-again
This commit is contained in:
@ -95,14 +95,6 @@ matrix_debian_arch: "{{ 'armhf' if matrix_architecture == 'arm32' else matrix_ar
|
||||
|
||||
matrix_container_global_registry_prefix: "docker.io/"
|
||||
|
||||
# Each docker pull will retry on failed attempt 10 times with delay of 10 seconds between each attempt.
|
||||
matrix_container_retries_count: 10
|
||||
matrix_container_retries_delay: 10
|
||||
|
||||
# Each get_url will retry on failed attempt 10 times with delay of 10 seconds between each attempt.
|
||||
matrix_geturl_retries_count: 10
|
||||
matrix_geturl_retries_delay: 10
|
||||
|
||||
matrix_user_username: "matrix"
|
||||
matrix_user_groupname: "matrix"
|
||||
|
||||
@ -116,12 +108,6 @@ matrix_base_data_path: "/matrix"
|
||||
matrix_base_data_path_mode: "750"
|
||||
|
||||
matrix_static_files_base_path: "{{ matrix_base_data_path }}/static-files"
|
||||
matrix_systemd_path: "/etc/systemd/system"
|
||||
|
||||
# Specifies the path to use for the `HOME` environment variable for systemd unit files.
|
||||
# Docker 20.10 complains with `WARNING: Error loading config file: .dockercfg: $HOME is not defined`
|
||||
# if `$HOME` is not defined, so we define something to make it happy.
|
||||
matrix_systemd_unit_home_path: /root
|
||||
|
||||
# This is now unused. We keep it so that cleanup tasks can use it.
|
||||
# To be removed in the future.
|
||||
@ -129,16 +115,10 @@ matrix_cron_path: "/etc/cron.d"
|
||||
|
||||
matrix_local_bin_path: "/usr/local/bin"
|
||||
|
||||
matrix_host_command_docker: "/usr/bin/env docker"
|
||||
matrix_host_command_sleep: "/usr/bin/env sleep"
|
||||
matrix_host_command_chown: "/usr/bin/env chown"
|
||||
matrix_host_command_fusermount: "/usr/bin/env fusermount"
|
||||
matrix_host_command_openssl: "/usr/bin/env openssl"
|
||||
matrix_host_command_systemctl: "/usr/bin/env systemctl"
|
||||
matrix_host_command_sh: "/usr/bin/env sh"
|
||||
|
||||
matrix_ntpd_package: "{{ 'systemd-timesyncd' if (ansible_os_family == 'RedHat' and ansible_distribution_major_version | int > 7) or (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version | int > 18) else ('systemd' if ansible_os_family == 'Suse' else 'ntp') }}"
|
||||
matrix_ntpd_service: "{{ 'systemd-timesyncd' if (ansible_os_family == 'RedHat' and ansible_distribution_major_version | int > 7) or (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version | int > 18) or ansible_distribution == 'Archlinux' or ansible_os_family == 'Suse' else ('ntpd' if ansible_os_family == 'RedHat' else 'ntp') }}"
|
||||
|
||||
matrix_homeserver_url: "https://{{ matrix_server_fqn_matrix }}"
|
||||
|
||||
@ -258,12 +238,6 @@ matrix_well_known_matrix_support_configuration: "{{ matrix_well_known_matrix_sup
|
||||
# The Docker network that all services would be put into
|
||||
matrix_docker_network: "matrix"
|
||||
|
||||
# Controls whether we'll preserve the vars.yml file on the Matrix server.
|
||||
# If you have a differently organized inventory, you may wish to disable this feature,
|
||||
# or to repoint `matrix_vars_yml_snapshotting_src` to the file you'd like to preserve.
|
||||
matrix_vars_yml_snapshotting_enabled: true
|
||||
matrix_vars_yml_snapshotting_src: "{{ inventory_dir }}/host_vars/{{ inventory_hostname }}/vars.yml"
|
||||
|
||||
# Controls whether a `/.well-known/matrix/server` file is generated and used at all.
|
||||
#
|
||||
# If you wish to rely on DNS SRV records only, you can disable this.
|
||||
@ -287,11 +261,6 @@ matrix_docker_installation_enabled: true
|
||||
# Possible values are "docker-ce" (default) and "docker.io" (Debian).
|
||||
matrix_docker_package_name: docker-ce
|
||||
|
||||
# Controls whether the current playbook's commit hash is saved in `git_hash.yml` on the target
|
||||
# Set this to false if GIT is not installed on the local system (the system where the ansible command is run on)
|
||||
# to suppress the warning message.
|
||||
matrix_playbook_commit_hash_preservation_enabled: true
|
||||
|
||||
# Variables to Control which parts of our roles run.
|
||||
run_postgres_import: true
|
||||
run_postgres_upgrade: true
|
||||
|
@ -39,9 +39,3 @@
|
||||
name: docker
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: "Ensure ntpd is started and autoruns"
|
||||
ansible.builtin.service:
|
||||
name: "{{ matrix_ntpd_service }}"
|
||||
state: started
|
||||
enabled: true
|
||||
|
@ -25,13 +25,6 @@
|
||||
update_cache: true
|
||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
||||
|
||||
- name: Ensure APT packages are installed
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- "{{ matrix_ntpd_package }}"
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Ensure Docker is installed
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
|
@ -17,13 +17,6 @@
|
||||
key: https://download.docker.com/linux/fedora/gpg
|
||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
||||
|
||||
- name: Ensure yum packages are installed
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
- "{{ matrix_ntpd_package }}"
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Ensure Docker is installed
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
|
@ -25,13 +25,6 @@
|
||||
update_cache: true
|
||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
||||
|
||||
- name: Ensure APT packages are installed
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- "{{ matrix_ntpd_package }}"
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Ensure Docker is installed
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
|
@ -15,13 +15,6 @@
|
||||
key: https://download.docker.com/linux/centos/gpg
|
||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
||||
|
||||
- name: Ensure yum packages are installed
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
- "{{ matrix_ntpd_package }}"
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Ensure Docker is installed
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
|
@ -22,13 +22,6 @@
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Ensure yum packages are installed
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
- "{{ matrix_ntpd_package }}"
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Ensure Docker is installed
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
|
@ -10,61 +10,6 @@
|
||||
with_items:
|
||||
- "{{ matrix_base_data_path }}"
|
||||
|
||||
- name: Preserve vars.yml on the server for easily restoring if it gets lost later on
|
||||
ansible.builtin.copy:
|
||||
src: "{{ matrix_vars_yml_snapshotting_src }}"
|
||||
dest: "{{ matrix_base_data_path }}/vars.yml"
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
mode: '0660'
|
||||
when: "matrix_vars_yml_snapshotting_enabled | bool"
|
||||
|
||||
- name: Save current git-repo status on the target to aid with restoring in case of problems
|
||||
when: "matrix_playbook_commit_hash_preservation_enabled|bool"
|
||||
block:
|
||||
- name: Get local git hash # noqa command-instead-of-module
|
||||
delegate_to: 127.0.0.1
|
||||
become: false
|
||||
register: git_describe
|
||||
changed_when: false
|
||||
ansible.builtin.shell:
|
||||
git describe
|
||||
--always
|
||||
--tags
|
||||
--dirty
|
||||
--long
|
||||
--all
|
||||
|
||||
- ansible.builtin.set_fact:
|
||||
git_hash: "{{ git_describe.stdout }}"
|
||||
|
||||
- name: Git hash
|
||||
ansible.builtin.debug:
|
||||
msg: "Git hash: {{ git_hash }}"
|
||||
|
||||
- name: Save git_hash.yml on target
|
||||
ansible.builtin.copy:
|
||||
content: "{{ git_hash }}"
|
||||
dest: "{{ matrix_base_data_path }}/git_hash.yml"
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
mode: '0660'
|
||||
|
||||
rescue:
|
||||
- name: GIT not found error
|
||||
ansible.builtin.debug:
|
||||
msg: >-
|
||||
Couldn't find GIT on the local machine. Continuing without saving the GIT hash.
|
||||
You can disable saving the GIT hash by setting 'matrix_playbook_commit_hash_preservation_enabled: false' in vars.yml
|
||||
when: "git_describe.stderr.find('git: not found') != -1"
|
||||
|
||||
- name: Get GIT hash error
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
Error when trying to get the GIT hash. Please consult the error message above.
|
||||
You can disable saving the GIT hash by setting 'matrix_playbook_commit_hash_preservation_enabled: false' in vars.yml
|
||||
when: "git_describe.stderr.find('git: not found') == -1"
|
||||
|
||||
- name: Ensure Matrix network is created in Docker
|
||||
community.docker.docker_network:
|
||||
name: "{{ matrix_docker_network }}"
|
||||
|
@ -16,9 +16,9 @@ if [ "$sure" != "Yes, I really want to remove everything!" ]; then
|
||||
else
|
||||
echo "Stop and remove matrix services"
|
||||
|
||||
for s in $(find {{ matrix_systemd_path }}/ -type f -name "matrix-*" -printf "%f\n"); do
|
||||
for s in $(find {{ devture_systemd_docker_base_systemd_path }}/ -type f -name "matrix-*" -printf "%f\n"); do
|
||||
systemctl disable --now $s
|
||||
rm -f {{ matrix_systemd_path }}/$s
|
||||
rm -f {{ devture_systemd_docker_base_systemd_path }}/$s
|
||||
done
|
||||
|
||||
systemctl daemon-reload
|
||||
|
Reference in New Issue
Block a user