From 29d10804f094133a7411bb3b121210ee6c543c68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?= Date: Mon, 7 Jan 2019 23:35:35 +0100 Subject: [PATCH] Use yaml syntax instead of key=value syntax consistently fixes #62 --- .../tasks/import/import_media_store.yml | 31 ++++++--- .../tasks/import/import_postgres.yml | 17 +++-- .../tasks/import/import_sqlite_db.yml | 19 ++++-- roles/matrix-server/tasks/register_user.yml | 19 ++++-- .../matrix-server/tasks/setup/setup_base.yml | 10 ++- .../tasks/setup/setup_goofys.yml | 11 +++- .../tasks/setup/setup_mailer.yml | 10 ++- .../matrix-server/tasks/setup/setup_mxisd.yml | 10 ++- .../tasks/setup/setup_nginx_proxy.yml | 8 ++- .../tasks/setup/setup_postgres.yml | 11 +++- .../tasks/setup/setup_riot_web.yml | 8 ++- .../setup_synapse_ext_mautrix_telegram.yml | 3 +- .../setup_synapse_ext_mautrix_whatsapp.yml | 3 +- .../setup/synapse/setup_synapse_main.yml | 3 +- roles/matrix-server/tasks/start.yml | 66 +++++++++++++++---- .../matrix-server/tasks/upgrade_postgres.yml | 30 +++++++-- 16 files changed, 195 insertions(+), 64 deletions(-) diff --git a/roles/matrix-server/tasks/import/import_media_store.yml b/roles/matrix-server/tasks/import/import_media_store.yml index 641798352..f3f606fdb 100644 --- a/roles/matrix-server/tasks/import/import_media_store.yml +++ b/roles/matrix-server/tasks/import/import_media_store.yml @@ -3,38 +3,48 @@ # Pre-checks - name: Fail if playbook called incorrectly - fail: msg="The `server_path_media_store` variable needs to be provided to this playbook, via --extra-vars" + fail: + msg: "The `server_path_media_store` variable needs to be provided to this playbook, via --extra-vars" when: "server_path_media_store is not defined or server_path_media_store.startswith('<')" - name: Fail if media store is on Amazon S3 - fail: msg="Your media store is on Amazon S3. Due to technical limitations, restoring is not supported." + fail: + msg: "Your media store is on Amazon S3. Due to technical limitations, restoring is not supported." when: "matrix_s3_media_store_enabled" - name: Check if the provided media store directory exists - stat: path="{{ server_path_media_store }}" + stat: + path: "{{ server_path_media_store }}" register: server_path_media_store_stat - name: Fail if provided media store directory doesn't exist on the server - fail: msg="{{ server_path_media_store }} cannot be found on the server" + fail: + msg: "{{ server_path_media_store }} cannot be found on the server" when: "not server_path_media_store_stat.stat.exists or not server_path_media_store_stat.stat.isdir" - name: Check if media store contains local_content - stat: path="{{ server_path_media_store }}/local_content" + stat: + path: "{{ server_path_media_store }}/local_content" register: server_path_media_store_local_content_stat - name: Check if media store contains remote_content - stat: path="{{ server_path_media_store }}/remote_content" + stat: + path: "{{ server_path_media_store }}/remote_content" register: server_path_media_store_remote_content_stat - name: Fail if media store directory doesn't look okay (lacking remote and local content) - fail: msg="{{ server_path_media_store }} contains neither local_content nor remote_content directories. It's most likely a mistake and is not a media store directory." + fail: + msg: "{{ server_path_media_store }} contains neither local_content nor remote_content directories. It's most likely a mistake and is not a media store directory." when: "not server_path_media_store_local_content_stat.stat.exists and not server_path_media_store_remote_content_stat.stat.exists" # Actual import work - name: Ensure matrix-synapse is stopped - service: name=matrix-synapse state=stopped daemon_reload=yes + service: + name: matrix-synapse + state: stopped + daemon_reload: yes register: stopping_result # This can only work with local files, not if the media store is on Amazon S3, @@ -64,7 +74,10 @@ # all files become owned by whoever needs to own them. - name: Ensure Matrix Synapse is started (if it previously was) - service: name="{{ item }}" state=started daemon_reload=yes + service: + name: "{{ item }}" + state: started + daemon_reload: yes when: stopping_result.changed with_items: - matrix-synapse diff --git a/roles/matrix-server/tasks/import/import_postgres.yml b/roles/matrix-server/tasks/import/import_postgres.yml index a8a426ff4..1c5989b12 100644 --- a/roles/matrix-server/tasks/import/import_postgres.yml +++ b/roles/matrix-server/tasks/import/import_postgres.yml @@ -3,21 +3,25 @@ # Pre-checks - name: Fail if playbook called incorrectly - fail: msg="The `server_path_postgres_dump` variable needs to be provided to this playbook, via --extra-vars" + fail: + msg: "The `server_path_postgres_dump` variable needs to be provided to this playbook, via --extra-vars" when: "server_path_postgres_dump is not defined or server_path_postgres_dump.startswith('<')" - name: Check if the provided Postgres dump file exists - stat: path="{{ server_path_postgres_dump }}" + stat: + path: "{{ server_path_postgres_dump }}" register: result_server_path_postgres_dump_stat - name: Fail if provided Postgres dump file doesn't exists - 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 - 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" + fail: + msg: "Could not find existing Postgres installation" when: "not matrix_postgres_detected_existing" @@ -32,7 +36,10 @@ # Actual import work - name: Ensure matrix-postgres is started - service: name=matrix-postgres state=started daemon_reload=yes + service: + name: matrix-postgres + state: started + daemon_reload: yes - name: Wait a bit, so that Postgres can start wait_for: diff --git a/roles/matrix-server/tasks/import/import_sqlite_db.yml b/roles/matrix-server/tasks/import/import_sqlite_db.yml index 347ac7618..cbfe6d7f9 100644 --- a/roles/matrix-server/tasks/import/import_sqlite_db.yml +++ b/roles/matrix-server/tasks/import/import_sqlite_db.yml @@ -3,15 +3,18 @@ # Pre-checks - name: Fail if playbook called incorrectly - fail: msg="The `server_path_homeserver_db` variable needs to be provided to this playbook, via --extra-vars" + fail: + msg: "The `server_path_homeserver_db` variable needs to be provided to this playbook, via --extra-vars" when: "server_path_homeserver_db is not defined or server_path_homeserver_db.startswith('<')" - name: Check if the provided SQLite homeserver.db file exists - stat: path="{{ server_path_homeserver_db }}" + stat: + path: "{{ server_path_homeserver_db }}" register: result_server_path_homeserver_db_stat - name: Fail if provided SQLite homeserver.db file doesn't exist - fail: msg="File cannot be found on the server at {{ server_path_homeserver_db }}" + fail: + msg: "File cannot be found on the server at {{ server_path_homeserver_db }}" when: not result_server_path_homeserver_db_stat.stat.exists @@ -26,7 +29,10 @@ # Actual import work - name: Ensure matrix-postgres is stopped - service: name=matrix-postgres state=stopped daemon_reload=yes + service: + name: matrix-postgres + state: stopped + daemon_reload: yes - name: Ensure postgres data is wiped out file: @@ -42,7 +48,10 @@ group: "{{ matrix_user_username }}" - name: Ensure matrix-postgres is started - service: name=matrix-postgres state=restarted daemon_reload=yes + service: + name: matrix-postgres + state: restarted + daemon_reload: yes - name: Wait a bit, so that Postgres can start wait_for: diff --git a/roles/matrix-server/tasks/register_user.yml b/roles/matrix-server/tasks/register_user.yml index f77ee08d5..1a4bd446e 100644 --- a/roles/matrix-server/tasks/register_user.yml +++ b/roles/matrix-server/tasks/register_user.yml @@ -1,24 +1,31 @@ --- - name: Fail if playbook called incorrectly - fail: msg="The `username` variable needs to be provided to this playbook, via --extra-vars" + fail: + msg: "The `username` variable needs to be provided to this playbook, via --extra-vars" when: "username is not defined or username == ''" - name: Fail if playbook called incorrectly - fail: msg="The `password` variable needs to be provided to this playbook, via --extra-vars" + fail: + msg: "The `password` variable needs to be provided to this playbook, via --extra-vars" when: "password is not defined or password == ''" - name: Fail if playbook called incorrectly - fail: msg="The `admin` variable needs to be provided to this playbook, via --extra-vars" + fail: + msg: "The `admin` variable needs to be provided to this playbook, via --extra-vars" when: "admin is not defined or admin not in ['yes', 'no']" - name: Ensure matrix-synapse is started - service: name=matrix-synapse state=started daemon_reload=yes + service: + name: matrix-synapse + state: started + daemon_reload: yes register: start_result - name: Wait a while, so that Matrix Synapse can manage to start - pause: seconds=7 + pause: + seconds: 7 when: start_result.changed - name: Register user - shell: "/usr/local/bin/matrix-synapse-register-user {{ username }} {{ password }} {{ '1' if admin == 'yes' else '0' }}" \ No newline at end of file + shell: "/usr/local/bin/matrix-synapse-register-user {{ username }} {{ password }} {{ '1' if admin == 'yes' else '0' }}" diff --git a/roles/matrix-server/tasks/setup/setup_base.yml b/roles/matrix-server/tasks/setup/setup_base.yml index 14c288d73..5a41bd731 100644 --- a/roles/matrix-server/tasks/setup/setup_base.yml +++ b/roles/matrix-server/tasks/setup/setup_base.yml @@ -68,11 +68,17 @@ when: ansible_os_family == 'Debian' - name: Ensure firewalld is started and autoruns - service: name=firewalld state=started enabled=yes + service: + name: firewalld + state: started + enabled: yes when: ansible_os_family == 'RedHat' - name: Ensure Docker is started and autoruns - service: name=docker state=started enabled=yes + service: + name: docker + state: started + enabled: yes - name: Ensure ntpd is started and autoruns service: diff --git a/roles/matrix-server/tasks/setup/setup_goofys.yml b/roles/matrix-server/tasks/setup/setup_goofys.yml index 77004f0e5..d08940ce0 100644 --- a/roles/matrix-server/tasks/setup/setup_goofys.yml +++ b/roles/matrix-server/tasks/setup/setup_goofys.yml @@ -9,7 +9,8 @@ # This will throw a Permission Denied error if already mounted - name: Check Matrix Goofys external storage mountpoint path - stat: path="{{ matrix_synapse_media_store_path }}" + stat: + path: "{{ matrix_synapse_media_store_path }}" register: local_path_matrix_synapse_media_store_path_stat ignore_errors: yes when: matrix_s3_media_store_enabled @@ -43,11 +44,15 @@ # - name: Check existence of matrix-goofys service - stat: path="/etc/systemd/system/matrix-goofys.service" + stat: + path: "/etc/systemd/system/matrix-goofys.service" register: matrix_goofys_service_stat - name: Ensure matrix-goofys is stopped - service: name=matrix-goofys state=stopped daemon_reload=yes + service: + name: matrix-goofys + state: stopped + daemon_reload: yes register: stopping_result when: "not matrix_s3_media_store_enabled and matrix_goofys_service_stat.stat.exists" diff --git a/roles/matrix-server/tasks/setup/setup_mailer.yml b/roles/matrix-server/tasks/setup/setup_mailer.yml index fc8fb22f1..1879917b0 100644 --- a/roles/matrix-server/tasks/setup/setup_mailer.yml +++ b/roles/matrix-server/tasks/setup/setup_mailer.yml @@ -29,11 +29,15 @@ # - name: Check existence of matrix-mailer service - stat: path="/etc/systemd/system/matrix-mailer.service" + stat: + path: "/etc/systemd/system/matrix-mailer.service" register: matrix_mailer_service_stat - name: Ensure matrix-mailer is stopped - service: name=matrix-mailer state=stopped daemon_reload=yes + service: + name: matrix-mailer + state: stopped + daemon_reload: yes register: stopping_result when: "not matrix_mailer_enabled and matrix_mailer_service_stat.stat.exists" @@ -53,4 +57,4 @@ docker_image: name: "{{ matrix_mailer_docker_image }}" state: absent - when: "not matrix_mailer_enabled" \ No newline at end of file + when: "not matrix_mailer_enabled" diff --git a/roles/matrix-server/tasks/setup/setup_mxisd.yml b/roles/matrix-server/tasks/setup/setup_mxisd.yml index 5a76d3720..e80ddbbfd 100644 --- a/roles/matrix-server/tasks/setup/setup_mxisd.yml +++ b/roles/matrix-server/tasks/setup/setup_mxisd.yml @@ -52,11 +52,15 @@ # - name: Check existence of matrix-mxisd service - stat: path="/etc/systemd/system/matrix-mxisd.service" + stat: + path: "/etc/systemd/system/matrix-mxisd.service" register: matrix_mxisd_service_stat - name: Ensure matrix-mxisd is stopped - service: name=matrix-mxisd state=stopped daemon_reload=yes + service: + name: matrix-mxisd + state: stopped + daemon_reload: yes register: stopping_result when: "not matrix_mxisd_enabled and matrix_mxisd_service_stat.stat.exists" @@ -76,4 +80,4 @@ docker_image: name: "{{ matrix_mxisd_docker_image }}" state: absent - when: "not matrix_mxisd_enabled" \ No newline at end of file + when: "not matrix_mxisd_enabled" diff --git a/roles/matrix-server/tasks/setup/setup_nginx_proxy.yml b/roles/matrix-server/tasks/setup/setup_nginx_proxy.yml index 8a4b1029a..b0a881a2e 100644 --- a/roles/matrix-server/tasks/setup/setup_nginx_proxy.yml +++ b/roles/matrix-server/tasks/setup/setup_nginx_proxy.yml @@ -69,11 +69,15 @@ # - name: Check existence of matrix-nginx-proxy service - stat: path="/etc/systemd/system/matrix-nginx-proxy.service" + stat: + path: "/etc/systemd/system/matrix-nginx-proxy.service" register: matrix_nginx_proxy_service_stat - name: Ensure matrix-nginx-proxy is stopped - service: name=matrix-nginx-proxy state=stopped daemon_reload=yes + service: + name: matrix-nginx-proxy + state: stopped + daemon_reload: yes register: stopping_result when: "not matrix_nginx_proxy_enabled and matrix_nginx_proxy_service_stat.stat.exists" diff --git a/roles/matrix-server/tasks/setup/setup_postgres.yml b/roles/matrix-server/tasks/setup/setup_postgres.yml index aaadec903..5ffa3ebc3 100644 --- a/roles/matrix-server/tasks/setup/setup_postgres.yml +++ b/roles/matrix-server/tasks/setup/setup_postgres.yml @@ -69,12 +69,16 @@ # - name: Check existence of matrix-postgres service - stat: path="/etc/systemd/system/matrix-postgres.service" + stat: + path: "/etc/systemd/system/matrix-postgres.service" register: matrix_postgres_service_stat when: matrix_postgres_use_external - name: Ensure matrix-postgres is stopped - service: name=matrix-postgres state=stopped daemon_reload=yes + service: + name: matrix-postgres + state: stopped + daemon_reload: yes when: "matrix_postgres_use_external and matrix_postgres_service_stat.stat.exists" - name: Ensure matrix-postgres.service doesn't exist @@ -84,7 +88,8 @@ when: "matrix_postgres_use_external and matrix_postgres_service_stat.stat.exists" - name: Check existence of matrix-postgres local data path - stat: path="{{ matrix_postgres_data_path }}" + stat: + path: "{{ matrix_postgres_data_path }}" register: matrix_postgres_data_path_stat when: matrix_postgres_use_external diff --git a/roles/matrix-server/tasks/setup/setup_riot_web.yml b/roles/matrix-server/tasks/setup/setup_riot_web.yml index 60b1cdcd6..5a279074f 100644 --- a/roles/matrix-server/tasks/setup/setup_riot_web.yml +++ b/roles/matrix-server/tasks/setup/setup_riot_web.yml @@ -43,11 +43,15 @@ # - name: Check existence of matrix-riot-web service - stat: path="/etc/systemd/system/matrix-riot-web.service" + stat: + path: "/etc/systemd/system/matrix-riot-web.service" register: matrix_riot_web_service_stat - name: Ensure matrix-riot-web is stopped - service: name=matrix-riot-web state=stopped daemon_reload=yes + service: + name: matrix-riot-web + state: stopped + daemon_reload: yes register: stopping_result when: "not matrix_riot_web_enabled and matrix_riot_web_service_stat.stat.exists" diff --git a/roles/matrix-server/tasks/setup/synapse/ext/setup_synapse_ext_mautrix_telegram.yml b/roles/matrix-server/tasks/setup/synapse/ext/setup_synapse_ext_mautrix_telegram.yml index 2ea8bb29d..25a04d56a 100644 --- a/roles/matrix-server/tasks/setup/synapse/ext/setup_synapse_ext_mautrix_telegram.yml +++ b/roles/matrix-server/tasks/setup/synapse/ext/setup_synapse_ext_mautrix_telegram.yml @@ -33,7 +33,8 @@ mode: 0644 when: "matrix_mautrix_telegram_enabled" -- stat: "path={{ matrix_mautrix_telegram_base_path }}/registration.yaml" +- stat: + path: "{{ matrix_mautrix_telegram_base_path }}/registration.yaml" register: mautrix_telegram_registration_file - name: Generate matrix-mautrix-telegram registration.yaml if it doesn't exist diff --git a/roles/matrix-server/tasks/setup/synapse/ext/setup_synapse_ext_mautrix_whatsapp.yml b/roles/matrix-server/tasks/setup/synapse/ext/setup_synapse_ext_mautrix_whatsapp.yml index eb4ed1718..6afc4947c 100644 --- a/roles/matrix-server/tasks/setup/synapse/ext/setup_synapse_ext_mautrix_whatsapp.yml +++ b/roles/matrix-server/tasks/setup/synapse/ext/setup_synapse_ext_mautrix_whatsapp.yml @@ -33,7 +33,8 @@ mode: 0644 when: "matrix_mautrix_whatsapp_enabled" -- stat: "path={{ matrix_mautrix_whatsapp_base_path }}/registration.yaml" +- stat: + path: "{{ matrix_mautrix_whatsapp_base_path }}/registration.yaml" register: mautrix_whatsapp_registration_file - name: Generate matrix-mautrix-whatsapp registration.yaml if it doesn't exist diff --git a/roles/matrix-server/tasks/setup/synapse/setup_synapse_main.yml b/roles/matrix-server/tasks/setup/synapse/setup_synapse_main.yml index 6264abce4..8466770ca 100644 --- a/roles/matrix-server/tasks/setup/synapse/setup_synapse_main.yml +++ b/roles/matrix-server/tasks/setup/synapse/setup_synapse_main.yml @@ -2,7 +2,8 @@ # This will throw a Permission Denied error if already mounted using fuse - name: Check Matrix Synapse media store path - stat: path="{{ matrix_synapse_media_store_path }}" + stat: + path: "{{ matrix_synapse_media_store_path }}" register: local_path_media_store_stat ignore_errors: yes diff --git a/roles/matrix-server/tasks/start.yml b/roles/matrix-server/tasks/start.yml index 4e5373c4f..bbdf09f6e 100644 --- a/roles/matrix-server/tasks/start.yml +++ b/roles/matrix-server/tasks/start.yml @@ -1,43 +1,87 @@ --- - 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 when: "not matrix_postgres_use_external" - name: Ensure matrix-goofys autoruns and is restarted - service: name=matrix-goofys enabled=yes state=restarted daemon_reload=yes + service: + name: matrix-goofys + enabled: yes + state: restarted + daemon_reload: yes when: matrix_s3_media_store_enabled - name: Ensure matrix-coturn autoruns and is restarted - service: name=matrix-coturn enabled=yes state=restarted daemon_reload=yes + service: + name: matrix-coturn + enabled: yes + state: restarted + daemon_reload: yes - name: Ensure matrix-mailer autoruns and is restarted - service: name=matrix-mailer enabled=yes state=restarted daemon_reload=yes + service: + name: matrix-mailer + enabled: yes + state: restarted + daemon_reload: yes when: matrix_mailer_enabled - name: Ensure matrix-mxisd autoruns and is restarted - service: name=matrix-mxisd enabled=yes state=restarted daemon_reload=yes + service: + name: matrix-mxisd + enabled: yes + state: restarted + daemon_reload: yes when: matrix_mxisd_enabled - name: Ensure matrix-synapse autoruns and is restarted - service: name=matrix-synapse enabled=yes state=restarted daemon_reload=yes + service: + name: matrix-synapse + enabled: yes + state: restarted + daemon_reload: yes - name: Ensure matrix-riot-web autoruns and is restarted - service: name=matrix-riot-web enabled=yes state=restarted daemon_reload=yes + service: + name: matrix-riot-web + enabled: yes + state: restarted + daemon_reload: yes when: matrix_riot_web_enabled - name: Ensure matrix-nginx-proxy autoruns and is restarted - service: name=matrix-nginx-proxy enabled=yes state=restarted daemon_reload=yes + service: + name: matrix-nginx-proxy + enabled: yes + state: restarted + daemon_reload: yes when: matrix_nginx_proxy_enabled - name: Ensure matrix-corporal autoruns and is restarted - service: name=matrix-corporal enabled=yes state=restarted daemon_reload=yes + service: + name: matrix-corporal + enabled: yes + state: restarted + daemon_reload: yes when: matrix_corporal_enabled - name: Ensure matrix-mautrix-telegram autoruns and is restarted - service: name=matrix-mautrix-telegram enabled=yes state=restarted daemon_reload=yes + service: + name: matrix-mautrix-telegram + enabled: yes + state: restarted + daemon_reload: yes when: matrix_mautrix_telegram_enabled - name: Ensure matrix-mautrix-whatsapp autoruns and is restarted - service: name=matrix-mautrix-whatsapp enabled=yes state=restarted daemon_reload=yes + service: + name: matrix-mautrix-whatsapp + enabled: yes + state: restarted + daemon_reload: yes when: matrix_mautrix_whatsapp_enabled diff --git a/roles/matrix-server/tasks/upgrade_postgres.yml b/roles/matrix-server/tasks/upgrade_postgres.yml index 6572d1e38..69955b30f 100644 --- a/roles/matrix-server/tasks/upgrade_postgres.yml +++ b/roles/matrix-server/tasks/upgrade_postgres.yml @@ -38,21 +38,28 @@ - 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" + fail: + msg: "Could not find existing Postgres installation" when: "not matrix_postgres_detected_existing" - name: Abort, if already at latest Postgres version - fail: msg="You are already running the latest Postgres version supported ({{ matrix_postgres_docker_image_latest }}). Nothing to do" + fail: + msg: "You are already running the latest Postgres version supported ({{ matrix_postgres_docker_image_latest }}). Nothing to do" when: "matrix_postgres_detected_version_corresponding_docker_image == matrix_postgres_docker_image_latest" - debug: msg: "Upgrading database from {{ matrix_postgres_detected_version_corresponding_docker_image }} to {{ matrix_postgres_docker_image_latest }}" - name: Ensure matrix-synapse is stopped - service: name=matrix-synapse state=stopped + service: + name: matrix-synapse + state: stopped - name: Ensure matrix-postgres is started - service: name=matrix-postgres state=started daemon_reload=yes + service: + name: matrix-postgres + state: started + daemon_reload: yes - name: Wait a bit, so that Postgres can start wait_for: @@ -69,7 +76,9 @@ {{ matrix_postgres_detected_version_corresponding_docker_image }} pg_dump -h matrix-postgres {{ matrix_postgres_db_name }} -f /out/{{ postgres_dump_name }} - name: Ensure matrix-postgres is stopped - service: name=matrix-postgres state=stopped + service: + name: matrix-postgres + state: stopped - name: Rename existing Postgres data directory command: "mv {{ matrix_postgres_data_path }} {{ postgres_auto_upgrade_backup_data_path }}" @@ -80,7 +89,11 @@ - 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 + service: + name: matrix-postgres + enabled: yes + state: restarted + daemon_reload: yes - name: Wait a bit, so that Postgres can start wait_for: @@ -102,7 +115,10 @@ state: absent - name: Ensure matrix-synapse is started - service: name=matrix-synapse state=started daemon_reload=yes + service: + name: matrix-synapse + state: started + daemon_reload: yes - debug: msg: "NOTE: Your old Postgres data directory is preserved at `{{ postgres_auto_upgrade_backup_data_path }}`. You might want to get rid of it once you've confirmed that all is well."