mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-11-14 10:04:46 +08:00
Replace include usage with include_tasks and import_tasks
The long-deprecated (since Ansible 2.4) use of include is no more.
This commit is contained in:
parent
76506f34e0
commit
99af4543ac
@ -14,7 +14,7 @@
|
||||
fail: msg="File cannot be found on the server at {{ server_path_postgres_dump }}"
|
||||
when: not result_server_path_postgres_dump_stat.stat.exists
|
||||
|
||||
- include: tasks/util/detect_existing_postgres_version.yml
|
||||
- import_tasks: tasks/util/detect_existing_postgres_version.yml
|
||||
|
||||
- name: Abort, if no existing Postgres version detected
|
||||
fail: msg="Could not find existing Postgres installation"
|
||||
|
@ -1,39 +1,39 @@
|
||||
---
|
||||
|
||||
- include: tasks/setup/main.yml
|
||||
- import_tasks: tasks/setup/main.yml
|
||||
when: run_setup
|
||||
|
||||
- include: tasks/import/import_postgres.yml
|
||||
- import_tasks: tasks/import/import_postgres.yml
|
||||
tags:
|
||||
- import-postgres
|
||||
when: run_import_postgres
|
||||
|
||||
- include: tasks/upgrade_postgres.yml
|
||||
- import_tasks: tasks/upgrade_postgres.yml
|
||||
tags:
|
||||
- upgrade-postgres
|
||||
when: run_upgrade_postgres
|
||||
|
||||
- include: tasks/start.yml
|
||||
- import_tasks: tasks/start.yml
|
||||
tags:
|
||||
- start
|
||||
when: run_start
|
||||
|
||||
- include: tasks/register_user.yml
|
||||
- import_tasks: tasks/register_user.yml
|
||||
tags:
|
||||
- register-user
|
||||
when: run_register_user
|
||||
|
||||
- include: tasks/import/import_sqlite_db.yml
|
||||
- import_tasks: tasks/import/import_sqlite_db.yml
|
||||
tags:
|
||||
- import-sqlite-db
|
||||
when: run_import_sqlite_db
|
||||
|
||||
- include: tasks/import/import_media_store.yml
|
||||
- import_tasks: tasks/import/import_media_store.yml
|
||||
tags:
|
||||
- import-media-store
|
||||
when: run_import_media_store
|
||||
|
||||
- include: tasks/self_check/main.yml
|
||||
- import_tasks: tasks/self_check/main.yml
|
||||
delegate_to: 127.0.0.1
|
||||
become: false
|
||||
tags:
|
||||
|
@ -1,18 +1,18 @@
|
||||
---
|
||||
|
||||
- include: tasks/self_check/self_check_dns.yml
|
||||
- import_tasks: tasks/self_check/self_check_dns.yml
|
||||
|
||||
- include: tasks/self_check/self_check_client_api.yml
|
||||
- import_tasks: tasks/self_check/self_check_client_api.yml
|
||||
|
||||
- include: tasks/self_check/self_check_federation_api.yml
|
||||
- import_tasks: tasks/self_check/self_check_federation_api.yml
|
||||
|
||||
- include: tasks/self_check/self_check_riot_web.yml
|
||||
- import_tasks: tasks/self_check/self_check_riot_web.yml
|
||||
when: "matrix_riot_web_enabled"
|
||||
|
||||
- include: tasks/self_check/self_check_mxisd.yml
|
||||
- import_tasks: tasks/self_check/self_check_mxisd.yml
|
||||
when: "matrix_mxisd_enabled"
|
||||
|
||||
- include: tasks/self_check/self_check_well_known.yml
|
||||
- import_tasks: tasks/self_check/self_check_well_known.yml
|
||||
|
||||
- include: tasks/self_check/self_check_corporal.yml
|
||||
- import_tasks: tasks/self_check/self_check_corporal.yml
|
||||
when: "matrix_corporal_enabled"
|
@ -1,68 +1,68 @@
|
||||
---
|
||||
|
||||
- include: tasks/setup/setup_sanity_check.yml
|
||||
- import_tasks: tasks/setup/setup_sanity_check.yml
|
||||
tags:
|
||||
- always
|
||||
|
||||
- include: tasks/setup/setup_base.yml
|
||||
- import_tasks: tasks/setup/setup_base.yml
|
||||
tags:
|
||||
- setup-all
|
||||
|
||||
- include: tasks/setup/setup_main.yml
|
||||
- import_tasks: tasks/setup/setup_main.yml
|
||||
tags:
|
||||
- setup-all
|
||||
|
||||
- include: tasks/setup/ssl/main.yml
|
||||
- import_tasks: tasks/setup/ssl/main.yml
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-ssl
|
||||
|
||||
- include: tasks/setup/setup_postgres.yml
|
||||
- import_tasks: tasks/setup/setup_postgres.yml
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-postgres
|
||||
|
||||
- include: tasks/setup/setup_goofys.yml
|
||||
- import_tasks: tasks/setup/setup_goofys.yml
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-goofys
|
||||
|
||||
- include: tasks/setup/setup_coturn.yml
|
||||
- import_tasks: tasks/setup/setup_coturn.yml
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-coturn
|
||||
|
||||
- include: tasks/setup/setup_mailer.yml
|
||||
- import_tasks: tasks/setup/setup_mailer.yml
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-mailer
|
||||
|
||||
- include: tasks/setup/setup_mxisd.yml
|
||||
- import_tasks: tasks/setup/setup_mxisd.yml
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-mxisd
|
||||
|
||||
- include: tasks/setup/setup_corporal_overrides.yml
|
||||
- import_tasks: tasks/setup/setup_corporal_overrides.yml
|
||||
tags:
|
||||
- always
|
||||
|
||||
- include: tasks/setup/setup_corporal.yml
|
||||
- import_tasks: tasks/setup/setup_corporal.yml
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-corporal
|
||||
|
||||
- include: tasks/setup/synapse/main.yml
|
||||
- import_tasks: tasks/setup/synapse/main.yml
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-synapse
|
||||
- setup-coturn
|
||||
|
||||
- include: tasks/setup/setup_riot_web.yml
|
||||
- import_tasks: tasks/setup/setup_riot_web.yml
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-riot-web
|
||||
|
||||
- include: tasks/setup/setup_well_known.yml
|
||||
- import_tasks: tasks/setup/setup_well_known.yml
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-mxisd
|
||||
@ -70,7 +70,7 @@
|
||||
- setup-nginx-proxy
|
||||
- setup-well-known
|
||||
|
||||
- include: tasks/setup/setup_nginx_proxy.yml
|
||||
- import_tasks: tasks/setup/setup_nginx_proxy.yml
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-nginx-proxy
|
||||
|
@ -4,7 +4,7 @@
|
||||
# Generic tasks, no matter what kind of server we're using (internal/external)
|
||||
#
|
||||
|
||||
- include: tasks/util/detect_existing_postgres_version.yml
|
||||
- import_tasks: tasks/util/detect_existing_postgres_version.yml
|
||||
|
||||
# If we have found an existing version (installed from before), we use its corresponding Docker image.
|
||||
# If not, we install using the latest Postgres.
|
||||
|
@ -31,8 +31,8 @@
|
||||
|
||||
# Method specific tasks follow
|
||||
|
||||
- include: tasks/setup/ssl/setup_ssl_lets_encrypt.yml
|
||||
- import_tasks: tasks/setup/ssl/setup_ssl_lets_encrypt.yml
|
||||
|
||||
- include: tasks/setup/ssl/setup_ssl_self_signed.yml
|
||||
- import_tasks: tasks/setup/ssl/setup_ssl_self_signed.yml
|
||||
|
||||
- include: tasks/setup/ssl/setup_ssl_manually_managed.yml
|
||||
- import_tasks: tasks/setup/ssl/setup_ssl_manually_managed.yml
|
||||
|
@ -26,7 +26,7 @@
|
||||
when: "matrix_ssl_retrieval_method == 'lets-encrypt'"
|
||||
|
||||
- name: Obtain Let's Encrypt certificates
|
||||
include_tasks: "tasks/setup/ssl/setup_ssl_lets_encrypt_obtain_for_domain.yml"
|
||||
include_tasks: "{{ role_path }}/tasks/setup/ssl/setup_ssl_lets_encrypt_obtain_for_domain.yml"
|
||||
with_items: "{{ domains_requiring_certificates }}"
|
||||
loop_control:
|
||||
loop_var: domain_name
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Verify certificates
|
||||
include_tasks: "tasks/setup/ssl/setup_ssl_manually_managed_verify_for_domain.yml"
|
||||
include_tasks: "{{ role_path }}/tasks/setup/ssl/setup_ssl_manually_managed_verify_for_domain.yml"
|
||||
with_items: "{{ domains_requiring_certificates }}"
|
||||
loop_control:
|
||||
loop_var: domain_name
|
||||
|
@ -17,7 +17,7 @@
|
||||
when: "matrix_ssl_retrieval_method == 'self-signed' and ansible_os_family == 'Debian'"
|
||||
|
||||
- name: Generate self-signed certificates
|
||||
include_tasks: "tasks/setup/ssl/setup_ssl_self_signed_obtain_for_domain.yml"
|
||||
include_tasks: "{{ role_path }}/tasks/setup/ssl/setup_ssl_self_signed_obtain_for_domain.yml"
|
||||
with_items: "{{ domains_requiring_certificates }}"
|
||||
loop_control:
|
||||
loop_var: domain_name
|
||||
|
@ -1,11 +1,11 @@
|
||||
---
|
||||
|
||||
- include: tasks/setup/synapse/ext/setup_synapse_ext_rest_auth.yml
|
||||
- import_tasks: tasks/setup/synapse/ext/setup_synapse_ext_rest_auth.yml
|
||||
|
||||
- include: tasks/setup/synapse/ext/setup_synapse_ext_shared_secret_auth.yml
|
||||
- import_tasks: tasks/setup/synapse/ext/setup_synapse_ext_shared_secret_auth.yml
|
||||
|
||||
- include: tasks/setup/synapse/ext/setup_synapse_ext_ldap_auth.yml
|
||||
- import_tasks: tasks/setup/synapse/ext/setup_synapse_ext_ldap_auth.yml
|
||||
|
||||
- include: tasks/setup/synapse/ext/setup_synapse_ext_mautrix_telegram.yml
|
||||
- import_tasks: tasks/setup/synapse/ext/setup_synapse_ext_mautrix_telegram.yml
|
||||
|
||||
- include: tasks/setup/synapse/ext/setup_synapse_ext_mautrix_whatsapp.yml
|
||||
- import_tasks: tasks/setup/synapse/ext/setup_synapse_ext_mautrix_whatsapp.yml
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
- include: tasks/setup/synapse/setup_synapse_pre.yml
|
||||
- import_tasks: tasks/setup/synapse/setup_synapse_pre.yml
|
||||
|
||||
- include: tasks/setup/synapse/ext/main.yml
|
||||
- import_tasks: tasks/setup/synapse/ext/main.yml
|
||||
|
||||
- include: tasks/setup/synapse/setup_synapse_main.yml
|
||||
- import_tasks: tasks/setup/synapse/setup_synapse_main.yml
|
||||
|
@ -35,7 +35,7 @@
|
||||
msg: "Detected that a left-over {{ postgres_auto_upgrade_backup_data_path }} exists. You should rename it to {{ matrix_postgres_data_path }} if the previous upgrade went wrong, or delete it if it went well."
|
||||
when: "result_auto_upgrade_path.stat.exists"
|
||||
|
||||
- include: tasks/util/detect_existing_postgres_version.yml
|
||||
- import_tasks: tasks/util/detect_existing_postgres_version.yml
|
||||
|
||||
- name: Abort, if no existing Postgres version detected
|
||||
fail: msg="Could not find existing Postgres installation"
|
||||
@ -77,7 +77,7 @@
|
||||
- debug:
|
||||
msg: "NOTE: Your Postgres data directory has been moved from `{{ matrix_postgres_data_path }}` to `{{ postgres_auto_upgrade_backup_data_path }}`. In the event of failure, you can move it back and run the playbook with --tags=setup-postgres to restore operation."
|
||||
|
||||
- include: tasks/setup/setup_postgres.yml
|
||||
- import_tasks: tasks/setup/setup_postgres.yml
|
||||
|
||||
- name: Ensure matrix-postgres autoruns and is restarted
|
||||
service: name=matrix-postgres enabled=yes state=restarted daemon_reload=yes
|
||||
|
Loading…
Reference in New Issue
Block a user