The long-deprecated (since Ansible 2.4) use of include is no more.pull/66/head
| @@ -14,7 +14,7 @@ | |||||
| fail: msg="File cannot be found on the server at {{ server_path_postgres_dump }}" | fail: msg="File cannot be found on the server at {{ server_path_postgres_dump }}" | ||||
| when: not result_server_path_postgres_dump_stat.stat.exists | 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 | - name: Abort, if no existing Postgres version detected | ||||
| fail: msg="Could not find existing Postgres installation" | 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 | when: run_setup | ||||
| - include: tasks/import/import_postgres.yml | |||||
| - import_tasks: tasks/import/import_postgres.yml | |||||
| tags: | tags: | ||||
| - import-postgres | - import-postgres | ||||
| when: run_import_postgres | when: run_import_postgres | ||||
| - include: tasks/upgrade_postgres.yml | |||||
| - import_tasks: tasks/upgrade_postgres.yml | |||||
| tags: | tags: | ||||
| - upgrade-postgres | - upgrade-postgres | ||||
| when: run_upgrade_postgres | when: run_upgrade_postgres | ||||
| - include: tasks/start.yml | |||||
| - import_tasks: tasks/start.yml | |||||
| tags: | tags: | ||||
| - start | - start | ||||
| when: run_start | when: run_start | ||||
| - include: tasks/register_user.yml | |||||
| - import_tasks: tasks/register_user.yml | |||||
| tags: | tags: | ||||
| - register-user | - register-user | ||||
| when: run_register_user | when: run_register_user | ||||
| - include: tasks/import/import_sqlite_db.yml | |||||
| - import_tasks: tasks/import/import_sqlite_db.yml | |||||
| tags: | tags: | ||||
| - import-sqlite-db | - import-sqlite-db | ||||
| when: run_import_sqlite_db | when: run_import_sqlite_db | ||||
| - include: tasks/import/import_media_store.yml | |||||
| - import_tasks: tasks/import/import_media_store.yml | |||||
| tags: | tags: | ||||
| - import-media-store | - import-media-store | ||||
| when: run_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 | delegate_to: 127.0.0.1 | ||||
| become: false | become: false | ||||
| tags: | 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" | 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" | 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" | when: "matrix_corporal_enabled" | ||||
| @@ -1,68 +1,68 @@ | |||||
| --- | --- | ||||
| - include: tasks/setup/setup_sanity_check.yml | |||||
| - import_tasks: tasks/setup/setup_sanity_check.yml | |||||
| tags: | tags: | ||||
| - always | - always | ||||
| - include: tasks/setup/setup_base.yml | |||||
| - import_tasks: tasks/setup/setup_base.yml | |||||
| tags: | tags: | ||||
| - setup-all | - setup-all | ||||
| - include: tasks/setup/setup_main.yml | |||||
| - import_tasks: tasks/setup/setup_main.yml | |||||
| tags: | tags: | ||||
| - setup-all | - setup-all | ||||
| - include: tasks/setup/ssl/main.yml | |||||
| - import_tasks: tasks/setup/ssl/main.yml | |||||
| tags: | tags: | ||||
| - setup-all | - setup-all | ||||
| - setup-ssl | - setup-ssl | ||||
| - include: tasks/setup/setup_postgres.yml | |||||
| - import_tasks: tasks/setup/setup_postgres.yml | |||||
| tags: | tags: | ||||
| - setup-all | - setup-all | ||||
| - setup-postgres | - setup-postgres | ||||
| - include: tasks/setup/setup_goofys.yml | |||||
| - import_tasks: tasks/setup/setup_goofys.yml | |||||
| tags: | tags: | ||||
| - setup-all | - setup-all | ||||
| - setup-goofys | - setup-goofys | ||||
| - include: tasks/setup/setup_coturn.yml | |||||
| - import_tasks: tasks/setup/setup_coturn.yml | |||||
| tags: | tags: | ||||
| - setup-all | - setup-all | ||||
| - setup-coturn | - setup-coturn | ||||
| - include: tasks/setup/setup_mailer.yml | |||||
| - import_tasks: tasks/setup/setup_mailer.yml | |||||
| tags: | tags: | ||||
| - setup-all | - setup-all | ||||
| - setup-mailer | - setup-mailer | ||||
| - include: tasks/setup/setup_mxisd.yml | |||||
| - import_tasks: tasks/setup/setup_mxisd.yml | |||||
| tags: | tags: | ||||
| - setup-all | - setup-all | ||||
| - setup-mxisd | - setup-mxisd | ||||
| - include: tasks/setup/setup_corporal_overrides.yml | |||||
| - import_tasks: tasks/setup/setup_corporal_overrides.yml | |||||
| tags: | tags: | ||||
| - always | - always | ||||
| - include: tasks/setup/setup_corporal.yml | |||||
| - import_tasks: tasks/setup/setup_corporal.yml | |||||
| tags: | tags: | ||||
| - setup-all | - setup-all | ||||
| - setup-corporal | - setup-corporal | ||||
| - include: tasks/setup/synapse/main.yml | |||||
| - import_tasks: tasks/setup/synapse/main.yml | |||||
| tags: | tags: | ||||
| - setup-all | - setup-all | ||||
| - setup-synapse | - setup-synapse | ||||
| - setup-coturn | - setup-coturn | ||||
| - include: tasks/setup/setup_riot_web.yml | |||||
| - import_tasks: tasks/setup/setup_riot_web.yml | |||||
| tags: | tags: | ||||
| - setup-all | - setup-all | ||||
| - setup-riot-web | - setup-riot-web | ||||
| - include: tasks/setup/setup_well_known.yml | |||||
| - import_tasks: tasks/setup/setup_well_known.yml | |||||
| tags: | tags: | ||||
| - setup-all | - setup-all | ||||
| - setup-mxisd | - setup-mxisd | ||||
| @@ -70,7 +70,7 @@ | |||||
| - setup-nginx-proxy | - setup-nginx-proxy | ||||
| - setup-well-known | - setup-well-known | ||||
| - include: tasks/setup/setup_nginx_proxy.yml | |||||
| - import_tasks: tasks/setup/setup_nginx_proxy.yml | |||||
| tags: | tags: | ||||
| - setup-all | - setup-all | ||||
| - setup-nginx-proxy | - setup-nginx-proxy | ||||
| @@ -4,7 +4,7 @@ | |||||
| # Generic tasks, no matter what kind of server we're using (internal/external) | # 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 we have found an existing version (installed from before), we use its corresponding Docker image. | ||||
| # If not, we install using the latest Postgres. | # If not, we install using the latest Postgres. | ||||
| @@ -31,8 +31,8 @@ | |||||
| # Method specific tasks follow | # 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'" | when: "matrix_ssl_retrieval_method == 'lets-encrypt'" | ||||
| - name: Obtain Let's Encrypt certificates | - 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 }}" | with_items: "{{ domains_requiring_certificates }}" | ||||
| loop_control: | loop_control: | ||||
| loop_var: domain_name | loop_var: domain_name | ||||
| @@ -1,7 +1,7 @@ | |||||
| --- | --- | ||||
| - name: Verify certificates | - 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 }}" | with_items: "{{ domains_requiring_certificates }}" | ||||
| loop_control: | loop_control: | ||||
| loop_var: domain_name | loop_var: domain_name | ||||
| @@ -17,7 +17,7 @@ | |||||
| when: "matrix_ssl_retrieval_method == 'self-signed' and ansible_os_family == 'Debian'" | when: "matrix_ssl_retrieval_method == 'self-signed' and ansible_os_family == 'Debian'" | ||||
| - name: Generate self-signed certificates | - 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 }}" | with_items: "{{ domains_requiring_certificates }}" | ||||
| loop_control: | loop_control: | ||||
| loop_var: domain_name | 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." | 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" | 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 | - name: Abort, if no existing Postgres version detected | ||||
| fail: msg="Could not find existing Postgres installation" | fail: msg="Could not find existing Postgres installation" | ||||
| @@ -77,7 +77,7 @@ | |||||
| - debug: | - 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." | 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 | - name: Ensure matrix-postgres autoruns and is restarted | ||||
| service: name=matrix-postgres enabled=yes state=restarted daemon_reload=yes | service: name=matrix-postgres enabled=yes state=restarted daemon_reload=yes | ||||