fix: all praise the allmighty yamllinter

pull/1606/head
Marko Weltzer 1 year ago
parent d3983a0f04
commit 7e5b88c3b7
  1. 1
      .github/FUNDING.yml
  2. 5
      .yamllint
  3. 2
      collections/requirements.yml
  4. 6
      docs/configuring-playbook-bot-go-neb.md
  5. 2
      docs/configuring-playbook-bot-mjolnir.md
  6. 2
      docs/configuring-playbook-bridge-mautrix-facebook.md
  7. 2
      docs/configuring-playbook-bridge-mautrix-googlechat.md
  8. 2
      docs/configuring-playbook-bridge-mautrix-hangouts.md
  9. 2
      docs/configuring-playbook-bridge-mautrix-signal.md
  10. 2
      docs/configuring-playbook-bridge-mautrix-telegram.md
  11. 2
      docs/configuring-playbook-bridge-mautrix-whatsapp.md
  12. 2
      docs/configuring-playbook-dimension.md
  13. 2
      docs/configuring-playbook-email2matrix.md
  14. 2
      docs/updating-users-passwords.md
  15. 3
      examples/haproxy/docker-compose.yml
  16. 1
      examples/vars.yml
  17. 22
      group_vars/matrix_servers
  18. 2
      roles/matrix-aux/tasks/main.yml
  19. 2
      roles/matrix-awx/defaults/main.yml
  20. 11
      roles/matrix-awx/tasks/backup_server.yml
  21. 5
      roles/matrix-awx/tasks/bridge_discord_appservice.yml
  22. 1
      roles/matrix-awx/tasks/cache_matrix_variables.yml
  23. 3
      roles/matrix-awx/tasks/create_session_token.yml
  24. 1
      roles/matrix-awx/tasks/create_user.yml
  25. 18
      roles/matrix-awx/tasks/customise_website_access_export.yml
  26. 6
      roles/matrix-awx/tasks/export_server.yml
  27. 6
      roles/matrix-awx/tasks/load_hosting_and_org_variables.yml
  28. 4
      roles/matrix-awx/tasks/load_matrix_variables.yml
  29. 54
      roles/matrix-awx/tasks/main.yml
  30. 42
      roles/matrix-awx/tasks/purge_database_main.yml
  31. 27
      roles/matrix-awx/tasks/purge_media_main.yml
  32. 2
      roles/matrix-awx/tasks/rotate_ssh.yml
  33. 24
      roles/matrix-awx/tasks/self_check.yml
  34. 4
      roles/matrix-awx/tasks/set_variables_corporal.yml
  35. 14
      roles/matrix-awx/tasks/set_variables_dimension.yml
  36. 4
      roles/matrix-awx/tasks/set_variables_element.yml
  37. 4
      roles/matrix-awx/tasks/set_variables_element_subdomain.yml
  38. 6
      roles/matrix-awx/tasks/set_variables_jitsi.yml
  39. 9
      roles/matrix-awx/tasks/set_variables_ma1sd.yml
  40. 4
      roles/matrix-awx/tasks/set_variables_mailer.yml
  41. 7
      roles/matrix-awx/tasks/set_variables_synapse.yml
  42. 6
      roles/matrix-awx/tasks/set_variables_synapse_admin.yml
  43. 4
      roles/matrix-awx/tasks/update_variables.yml
  44. 1
      roles/matrix-base/defaults/main.yml
  45. 2
      roles/matrix-base/tasks/clean_up_old_files.yml
  46. 2
      roles/matrix-base/tasks/main.yml
  47. 6
      roles/matrix-base/tasks/server_base/setup.yml
  48. 2
      roles/matrix-base/tasks/server_base/setup_archlinux.yml
  49. 2
      roles/matrix-base/tasks/server_base/setup_centos.yml
  50. 4
      roles/matrix-base/tasks/server_base/setup_centos8.yml
  51. 6
      roles/matrix-base/tasks/server_base/setup_debian.yml
  52. 6
      roles/matrix-base/tasks/server_base/setup_raspbian.yml
  53. 4
      roles/matrix-base/tasks/setup_matrix_user.yml
  54. 1
      roles/matrix-base/tasks/setup_well_known.yml
  55. 2
      roles/matrix-base/tasks/util/ensure_fuse_installed.yml
  56. 2
      roles/matrix-base/tasks/util/ensure_openssl_installed.yml
  57. 1
      roles/matrix-base/vars/main.yml
  58. 6
      roles/matrix-bot-go-neb/defaults/main.yml
  59. 2
      roles/matrix-bot-go-neb/tasks/init.yml
  60. 2
      roles/matrix-bot-go-neb/tasks/main.yml
  61. 8
      roles/matrix-bot-go-neb/tasks/setup_install.yml
  62. 6
      roles/matrix-bot-go-neb/tasks/setup_uninstall.yml
  63. 1
      roles/matrix-bot-honoroit/defaults/main.yml
  64. 2
      roles/matrix-bot-honoroit/tasks/init.yml
  65. 2
      roles/matrix-bot-honoroit/tasks/main.yml
  66. 12
      roles/matrix-bot-honoroit/tasks/setup_install.yml
  67. 6
      roles/matrix-bot-honoroit/tasks/setup_uninstall.yml
  68. 1
      roles/matrix-bot-matrix-reminder-bot/defaults/main.yml
  69. 2
      roles/matrix-bot-matrix-reminder-bot/tasks/init.yml
  70. 2
      roles/matrix-bot-matrix-reminder-bot/tasks/main.yml
  71. 12
      roles/matrix-bot-matrix-reminder-bot/tasks/setup_install.yml
  72. 6
      roles/matrix-bot-matrix-reminder-bot/tasks/setup_uninstall.yml
  73. 2
      roles/matrix-bot-mjolnir/defaults/main.yml
  74. 1
      roles/matrix-bot-mjolnir/tasks/init.yml
  75. 2
      roles/matrix-bot-mjolnir/tasks/main.yml
  76. 12
      roles/matrix-bot-mjolnir/tasks/setup_install.yml
  77. 6
      roles/matrix-bot-mjolnir/tasks/setup_uninstall.yml
  78. 1
      roles/matrix-bridge-appservice-discord/defaults/main.yml
  79. 1
      roles/matrix-bridge-appservice-discord/tasks/init.yml
  80. 2
      roles/matrix-bridge-appservice-discord/tasks/main.yml
  81. 6
      roles/matrix-bridge-appservice-discord/tasks/setup_install.yml
  82. 6
      roles/matrix-bridge-appservice-discord/tasks/setup_uninstall.yml
  83. 1
      roles/matrix-bridge-appservice-irc/defaults/main.yml
  84. 1
      roles/matrix-bridge-appservice-irc/tasks/init.yml
  85. 2
      roles/matrix-bridge-appservice-irc/tasks/main.yml
  86. 4
      roles/matrix-bridge-appservice-irc/tasks/migrate_nedb_to_postgres.yml
  87. 14
      roles/matrix-bridge-appservice-irc/tasks/setup_install.yml
  88. 6
      roles/matrix-bridge-appservice-irc/tasks/setup_uninstall.yml
  89. 1
      roles/matrix-bridge-appservice-slack/defaults/main.yml
  90. 63
      roles/matrix-bridge-appservice-slack/tasks/init.yml
  91. 2
      roles/matrix-bridge-appservice-slack/tasks/main.yml
  92. 4
      roles/matrix-bridge-appservice-slack/tasks/migrate_nedb_to_postgres.yml
  93. 12
      roles/matrix-bridge-appservice-slack/tasks/setup_install.yml
  94. 6
      roles/matrix-bridge-appservice-slack/tasks/setup_uninstall.yml
  95. 1
      roles/matrix-bridge-appservice-webhooks/defaults/main.yml
  96. 67
      roles/matrix-bridge-appservice-webhooks/tasks/init.yml
  97. 2
      roles/matrix-bridge-appservice-webhooks/tasks/main.yml
  98. 12
      roles/matrix-bridge-appservice-webhooks/tasks/setup_install.yml
  99. 6
      roles/matrix-bridge-appservice-webhooks/tasks/setup_uninstall.yml
  100. 1
      roles/matrix-bridge-beeper-linkedin/defaults/main.yml
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1,3 +1,4 @@
---
# These are supported funding model platforms
# https://liberapay.com/s.pantaleev/

@ -0,0 +1,5 @@
---
extends: default
rules:
line-length: disable

@ -1,4 +1,4 @@
---
collections:
- name: community.general
- name: community.docker
- name: community.docker

@ -28,7 +28,7 @@ If you use curl, you can get an access token like this:
```
curl -X POST --header 'Content-Type: application/json' -d '{
"identifier": { "type": "m.id.user", "user": "bot.go-neb" },
"identifier": { "type": "m.id.user", "user": "bot.go-neb"},
"password": "a strong password",
"type": "m.login.password"
}' 'https://matrix.YOURDOMAIN/_matrix/client/r0/login'
@ -198,8 +198,8 @@ matrix_bot_go_neb_services:
# Each room will get the notification with the alert rendered with the given template
rooms:
"!someroomid:domain.tld":
text_template: "{% raw %}{{range .Alerts -}} [{{ .Status }}] {{index .Labels \"alertname\" }}: {{index .Annotations \"description\"}} {{ end -}}{% endraw %}"
html_template: "{% raw %}{{range .Alerts -}} {{ $severity := index .Labels \"severity\" }} {{ if eq .Status \"firing\" }} {{ if eq $severity \"critical\"}} <font color='red'><b>[FIRING - CRITICAL]</b></font> {{ else if eq $severity \"warning\"}} <font color='orange'><b>[FIRING - WARNING]</b></font> {{ else }} <b>[FIRING - {{ $severity }}]</b> {{ end }} {{ else }} <font color='green'><b>[RESOLVED]</b></font> {{ end }} {{ index .Labels \"alertname\"}} : {{ index .Annotations \"description\"}} <a href=\"{{ .GeneratorURL }}\">source</a><br/>{{end -}}{% endraw %}"
text_template: "{% raw %}{{range .Alerts -}} [{{ .Status }}] {{index .Labels \"alertname\"}}: {{index .Annotations \"description\"}} {{ end -}}{% endraw %}"
html_template: "{% raw %}{{range .Alerts -}} {{ $severity := index .Labels \"severity\"}} {{ if eq .Status \"firing\"}} {{ if eq $severity \"critical\"}} <font color='red'><b>[FIRING - CRITICAL]</b></font> {{ else if eq $severity \"warning\"}} <font color='orange'><b>[FIRING - WARNING]</b></font> {{ else }} <b>[FIRING - {{ $severity }}]</b> {{ end }} {{ else }} <font color='green'><b>[RESOLVED]</b></font> {{ end }} {{ index .Labels \"alertname\"}} : {{ index .Annotations \"description\"}} <a href=\"{{ .GeneratorURL }}\">source</a><br/>{{end -}}{% endraw %}"
msg_type: "m.text" # Must be either `m.text` or `m.notice`
```

@ -28,7 +28,7 @@ If you use curl, you can get an access token like this:
```
curl -X POST --header 'Content-Type: application/json' -d '{
"identifier": { "type": "m.id.user", "user": "bot.mjolnir" },
"identifier": { "type": "m.id.user", "user": "bot.mjolnir"},
"password": "PASSWORD_FOR_THE_BOT",
"type": "m.login.password"
}' 'https://matrix.DOMAIN/_matrix/client/r0/login'

@ -50,7 +50,7 @@ When using this method, **each user** that wishes to enable Double Puppeting nee
```
curl \
--data '{"identifier": {"type": "m.id.user", "user": "YOUR_MATRIX_USERNAME" }, "password": "YOUR_MATRIX_PASSWORD", "type": "m.login.password", "device_id": "Mautrix-Facebook", "initial_device_display_name": "Mautrix-Facebook"}' \
--data '{"identifier": {"type": "m.id.user", "user": "YOUR_MATRIX_USERNAME"}, "password": "YOUR_MATRIX_PASSWORD", "type": "m.login.password", "device_id": "Mautrix-Facebook", "initial_device_display_name": "Mautrix-Facebook"}' \
https://matrix.DOMAIN/_matrix/client/r0/login
```

@ -33,7 +33,7 @@ When using this method, **each user** that wishes to enable Double Puppeting nee
```
curl \
--data '{"identifier": {"type": "m.id.user", "user": "YOUR_MATRIX_USERNAME" }, "password": "YOUR_MATRIX_PASSWORD", "type": "m.login.password", "device_id": "Mautrix-googlechat", "initial_device_display_name": "Mautrix-googlechat"}' \
--data '{"identifier": {"type": "m.id.user", "user": "YOUR_MATRIX_USERNAME"}, "password": "YOUR_MATRIX_PASSWORD", "type": "m.login.password", "device_id": "Mautrix-googlechat", "initial_device_display_name": "Mautrix-googlechat"}' \
https://matrix.DOMAIN/_matrix/client/r0/login
```

@ -35,7 +35,7 @@ When using this method, **each user** that wishes to enable Double Puppeting nee
```
curl \
--data '{"identifier": {"type": "m.id.user", "user": "YOUR_MATRIX_USERNAME" }, "password": "YOUR_MATRIX_PASSWORD", "type": "m.login.password", "device_id": "Mautrix-Hangouts", "initial_device_display_name": "Mautrix-Hangouts"}' \
--data '{"identifier": {"type": "m.id.user", "user": "YOUR_MATRIX_USERNAME"}, "password": "YOUR_MATRIX_PASSWORD", "type": "m.login.password", "device_id": "Mautrix-Hangouts", "initial_device_display_name": "Mautrix-Hangouts"}' \
https://matrix.DOMAIN/_matrix/client/r0/login
```

@ -77,7 +77,7 @@ When using this method, **each user** that wishes to enable Double Puppeting nee
```
curl \
--data '{"identifier": {"type": "m.id.user", "user": "YOUR_MATRIX_USERNAME" }, "password": "YOUR_MATRIX_PASSWORD", "type": "m.login.password", "device_id": "Mautrix-Signal", "initial_device_display_name": "Mautrix-Signal"}' \
--data '{"identifier": {"type": "m.id.user", "user": "YOUR_MATRIX_USERNAME"}, "password": "YOUR_MATRIX_PASSWORD", "type": "m.login.password", "device_id": "Mautrix-Signal", "initial_device_display_name": "Mautrix-Signal"}' \
https://matrix.DOMAIN/_matrix/client/r0/login
```

@ -32,7 +32,7 @@ When using this method, **each user** that wishes to enable Double Puppeting nee
```
curl \
--data '{"identifier": {"type": "m.id.user", "user": "YOUR_MATRIX_USERNAME" }, "password": "YOUR_MATRIX_PASSWORD", "type": "m.login.password", "device_id": "Mautrix-Telegram", "initial_device_display_name": "Mautrix-Telegram"}' \
--data '{"identifier": {"type": "m.id.user", "user": "YOUR_MATRIX_USERNAME"}, "password": "YOUR_MATRIX_PASSWORD", "type": "m.login.password", "device_id": "Mautrix-Telegram", "initial_device_display_name": "Mautrix-Telegram"}' \
https://matrix.DOMAIN/_matrix/client/r0/login
```

@ -48,7 +48,7 @@ When using this method, **each user** that wishes to enable Double Puppeting nee
```
curl \
--data '{"identifier": {"type": "m.id.user", "user": "YOUR_MATRIX_USERNAME" }, "password": "YOUR_MATRIX_PASSWORD", "type": "m.login.password", "device_id": "Mautrix-Whatsapp", "initial_device_display_name": "Mautrix-Whatsapp"}' \
--data '{"identifier": {"type": "m.id.user", "user": "YOUR_MATRIX_USERNAME"}, "password": "YOUR_MATRIX_PASSWORD", "type": "m.login.password", "device_id": "Mautrix-Whatsapp", "initial_device_display_name": "Mautrix-Whatsapp"}' \
https://matrix.DOMAIN/_matrix/client/r0/login
```

@ -53,7 +53,7 @@ To get an access token for the Dimension user, you can follow one of two options
```
curl -X POST --header 'Content-Type: application/json' -d '{
"identifier": { "type": "m.id.user", "user": "YourDimensionUsername" },
"identifier": { "type": "m.id.user", "user": "YourDimensionUsername"},
"password": "YourDimensionPassword",
"type": "m.login.password"
}' 'https://matrix.YOURDOMAIN/_matrix/client/r0/login'

@ -40,7 +40,7 @@ To do this, you can execute a command like this:
```
curl \
--data '{"identifier": {"type": "m.id.user", "user": "email2matrix" }, "password": "MATRIX_PASSWORD_FOR_THE_USER", "type": "m.login.password", "device_id": "Email2Matrix", "initial_device_display_name": "Email2Matrix"}' \
--data '{"identifier": {"type": "m.id.user", "user": "email2matrix"}, "password": "MATRIX_PASSWORD_FOR_THE_USER", "type": "m.login.password", "device_id": "Email2Matrix", "initial_device_display_name": "Email2Matrix"}' \
https://matrix.DOMAIN/_matrix/client/r0/login
```

@ -41,5 +41,5 @@ If you didn't make your account a server admin when you created it, you can use
### Example:
To set @user:domain.com's password to `correct_horse_battery_staple` you could use this curl command:
```
curl -XPOST -d '{ "new_password": "correct_horse_battery_staple" }' "https://matrix.<domain>/_matrix/client/r0/admin/reset_password/@user:domain.com?access_token=MDA...this_is_my_access_token
curl -XPOST -d '{ "new_password": "correct_horse_battery_staple"}' "https://matrix.<domain>/_matrix/client/r0/admin/reset_password/@user:domain.com?access_token=MDA...this_is_my_access_token
```

@ -1,7 +1,8 @@
---
version: '3'
services:
nginx:
image: local/nginx
image: local/nginx
ports:
- 40888:80
volumes:

@ -1,3 +1,4 @@
---
# The bare domain name which represents your Matrix identity.
# Matrix user ids for your server will be of the form (`@user:<matrix-domain>`).
#

@ -265,7 +265,7 @@ matrix_beeper_linkedin_homeserver_token: "{{ '%s' | format(matrix_homeserver_gen
matrix_beeper_linkedin_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
matrix_beeper_linkedin_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true }}"
matrix_beeper_linkedin_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true}}"
matrix_beeper_linkedin_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maulinkedin.db') | to_uuid }}"
@ -303,7 +303,7 @@ matrix_mautrix_facebook_homeserver_token: "{{ '%s' | format(matrix_homeserver_ge
matrix_mautrix_facebook_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
matrix_mautrix_facebook_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true }}"
matrix_mautrix_facebook_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true}}"
# We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
# and point them to a migration path.
@ -427,7 +427,7 @@ matrix_mautrix_instagram_homeserver_token: "{{ '%s' | format(matrix_homeserver_g
matrix_mautrix_instagram_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
matrix_mautrix_instagram_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true }}"
matrix_mautrix_instagram_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true}}"
# We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
# and point them to a migration path.
@ -1367,7 +1367,7 @@ matrix_ma1sd_threepid_medium_email_connectors_smtp_host: "matrix-mailer"
matrix_ma1sd_threepid_medium_email_connectors_smtp_port: 8025
matrix_ma1sd_threepid_medium_email_connectors_smtp_tls: 0
matrix_ma1sd_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
matrix_ma1sd_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true}}"
matrix_ma1sd_systemd_required_services_list: |
{{
@ -1479,7 +1479,7 @@ matrix_nginx_proxy_proxy_matrix_user_directory_search_enabled: "{{ matrix_ma1sd_
matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_with_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container }}"
matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_sans_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container }}"
matrix_nginx_proxy_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
matrix_nginx_proxy_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true}}"
# OCSP stapling does not make sense when self-signed certificates are used.
# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1073
@ -1886,7 +1886,7 @@ matrix_client_element_integrations_rest_url: "{{ matrix_dimension_integrations_r
matrix_client_element_integrations_widgets_urls: "{{ matrix_dimension_integrations_widgets_urls if matrix_dimension_enabled else ['https://scalar.vector.im/api'] }}"
matrix_client_element_integrations_jitsi_widget_url: "{{ matrix_dimension_integrations_jitsi_widget_url if matrix_dimension_enabled else 'https://scalar.vector.im/api/widgets/jitsi.html' }}"
matrix_client_element_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
matrix_client_element_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true}}"
matrix_client_element_registration_enabled: "{{ matrix_synapse_enable_registration }}"
@ -1924,7 +1924,7 @@ matrix_client_hydrogen_container_http_host_bind_port: "{{ '' if matrix_nginx_pro
matrix_client_hydrogen_default_hs_url: "{{ matrix_homeserver_url }}"
matrix_client_hydrogen_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
matrix_client_hydrogen_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true}}"
######################################################################
#
@ -1951,7 +1951,7 @@ matrix_client_cinny_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_
matrix_client_cinny_default_hs_url: "{{ matrix_homeserver_url }}"
matrix_client_cinny_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
matrix_client_cinny_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true}}"
######################################################################
#
@ -2042,7 +2042,7 @@ matrix_synapse_turn_uris: |
matrix_synapse_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if matrix_coturn_enabled else '' }}"
matrix_synapse_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
matrix_synapse_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true}}"
matrix_synapse_systemd_required_services_list: |
{{
@ -2228,7 +2228,7 @@ matrix_registration_shared_secret: |-
matrix_registration_server_location: "{{ matrix_homeserver_container_url }}"
matrix_registration_api_validate_certs: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
matrix_registration_api_validate_certs: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true}}"
matrix_registration_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
@ -2320,7 +2320,7 @@ matrix_dendrite_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if
matrix_dendrite_disable_tls_validation: "{{ true if matrix_ssl_retrieval_method == 'self-signed' else false }}"
matrix_dendrite_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
matrix_dendrite_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true}}"
matrix_dendrite_trusted_id_servers: "{{ [matrix_server_fqn_matrix] if matrix_ma1sd_enabled else ['matrix.org', 'vector.im'] }}"

@ -1,3 +1,5 @@
---
- import_tasks: "{{ role_path }}/tasks/setup.yml"
when: run_stop|bool
tags:

@ -1,3 +1,5 @@
---
matrix_awx_enabled: true
# Defaults for 'Customise Website + Access Export' template

@ -1,3 +1,4 @@
---
- name: Record Backup Server variables locally on AWX
delegate_to: 127.0.0.1
@ -38,18 +39,18 @@
credential: "{{ member_id }} - AWX SSH Key"
survey_enabled: true
survey_spec: "{{ lookup('file', '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/backup_server.json') }}"
become_enabled: yes
become_enabled: true
state: present
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true
tags: use-survey
- name: Include vars in matrix_vars.yml
include_vars:
file: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml'
no_log: True
no_log: true
- name: Copy new 'matrix_vars.yml' to target machine
copy:
@ -58,8 +59,8 @@
mode: '0660'
tags: use-survey
- name: Run initial backup of /matrix/ and snapshot the database simultaneously
command: "{{ item }}"
- name: Run initial backup of /matrix/ and snapshot the database simultaneously
command: "{{ item }}"
with_items:
- borgmatic -c /root/.config/borgmatic/config_1.yaml
- /bin/sh /usr/local/bin/awx-export-service.sh 1 0

@ -1,3 +1,4 @@
---
- name: Record Bridge Discord AppService variables locally on AWX
delegate_to: 127.0.0.1
@ -33,7 +34,7 @@
- name: Copy new 'Bridge Discord Appservice' survey.json to target machine
copy:
src: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/bridge_discord_appservice.json'
dest: '/matrix/awx/bridge_discord_appservice.json'
dest: '/matrix/awx/bridge_discord_appservice.json'
mode: '0660'
- name: Recreate 'Bridge Discord Appservice' job template
@ -54,4 +55,4 @@
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true

@ -1,3 +1,4 @@
---
- name: Collect current datetime
set_fact:

@ -1,3 +1,4 @@
---
- name: Create a AWX session token for executing modules
awx.awx.tower_token:
@ -7,4 +8,4 @@
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_master_token }}"
register: awx_session_token
no_log: True
no_log: true

@ -1,3 +1,4 @@
---
#
# Create user and define if they are admin
#

@ -48,7 +48,7 @@
- name: Reload vars in matrix_vars.yml
include_vars:
file: '{{ awx_cached_matrix_vars }}'
no_log: True
no_log: true
- name: Save new 'Customise Website + Access Export' survey.json to the AWX tower, template
delegate_to: 127.0.0.1
@ -60,7 +60,7 @@
- name: Copy new 'Customise Website + Access Export' survey.json to target machine
copy:
src: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_website_access_export.json'
dest: '/matrix/awx/configure_website_access_export.json'
dest: '/matrix/awx/configure_website_access_export.json'
mode: '0660'
when: awx_customise_base_domain_website is defined
@ -74,7 +74,7 @@
- name: Copy new 'Customise Website + Access Export' survey.json to target machine
copy:
src: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/access_export.json'
dest: '/matrix/awx/access_export.json'
dest: '/matrix/awx/access_export.json'
mode: '0660'
when: awx_customise_base_domain_website is undefined
@ -92,12 +92,12 @@
credential: "{{ member_id }} - AWX SSH Key"
survey_enabled: true
survey_spec: "{{ lookup('file', '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_website_access_export.json') }}"
become_enabled: yes
become_enabled: true
state: present
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true
when: awx_customise_base_domain_website is defined
- name: Recreate 'Access Export' job template
@ -114,12 +114,12 @@
credential: "{{ member_id }} - AWX SSH Key"
survey_enabled: true
survey_spec: "{{ lookup('file', '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/access_export.json') }}"
become_enabled: yes
become_enabled: true
state: present
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true
when: awx_customise_base_domain_website is undefined
- name: If user doesn't define a awx_sftp_password, create a disabled 'sftp' account
@ -153,7 +153,7 @@
user:
name: sftp
groups: sftp
append: yes
append: true
when: awx_customise_base_domain_website is defined
- name: Create the ro /chroot directory with sticky bit if it doesn't exist. (/chroot/website has matrix:matrix permissions and is mounted to nginx container)
@ -208,7 +208,7 @@
group: sftp
mode: '0644'
when: (awx_sftp_public_key | length > 0) and (awx_sftp_auth_method == "SSH Key")
- name: Remove any existing Subsystem lines
lineinfile:
path: /etc/ssh/sshd_config

@ -1,7 +1,7 @@
---
- name: Run export of /matrix/ and snapshot the database simultaneously
command: "{{ item }}"
- name: Run export of /matrix/ and snapshot the database simultaneously
command: "{{ item }}"
with_items:
- /bin/sh /usr/local/bin/awx-export-service.sh 1 0
- /bin/sh /usr/local/bin/awx-export-service.sh 0 1
@ -23,7 +23,7 @@
command: rm /chroot/export/matrix*
count: 1
units: days
unique: yes
unique: true
- name: Delete the AWX session token for executing modules
awx.awx.tower_token:

@ -3,14 +3,14 @@
- name: Include vars in organisation.yml
include_vars:
file: '/var/lib/awx/projects/clients/{{ member_id }}/organisation.yml'
no_log: True
no_log: true
- name: Include vars in hosting_vars.yml
include_vars:
file: '/var/lib/awx/projects/hosting/hosting_vars.yml'
no_log: True
no_log: true
- name: Include AWX master token from awx_tokens.yml
include_vars:
file: /var/lib/awx/projects/hosting/awx_tokens.yml
no_log: True
no_log: true

@ -3,9 +3,9 @@
- name: Include new vars in matrix_vars.yml
include_vars:
file: '{{ awx_cached_matrix_vars }}'
no_log: True
no_log: true
- name: If include_vars succeeds overwrite the old matrix_vars.yml
- name: If include_vars succeeds overwrite the old matrix_vars.yml
delegate_to: 127.0.0.1
shell: "cp {{ awx_cached_matrix_vars }} /var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml && rm {{ awx_cached_matrix_vars }}"

@ -1,6 +1,6 @@
---
# Load initial hosting and organisation variables from AWX volume
- include_tasks:
- include_tasks:
file: "load_hosting_and_org_variables.yml"
apply:
tags: always
@ -9,7 +9,7 @@
- always
# Renames or updates the vars.yml if needed
- include_tasks:
- include_tasks:
file: "update_variables.yml"
apply:
tags: always
@ -18,7 +18,7 @@
- always
# Create AWX session token
- include_tasks:
- include_tasks:
file: "create_session_token.yml"
apply:
tags: always
@ -27,7 +27,7 @@
- always
# Perform a backup of the server
- include_tasks:
- include_tasks:
file: "backup_server.yml"
apply:
tags: backup-server
@ -36,7 +36,7 @@
- backup-server
# Perform a export of the server
- include_tasks:
- include_tasks:
file: "export_server.yml"
apply:
tags: export-server
@ -45,7 +45,7 @@
- export-server
# Create a user account if called
- include_tasks:
- include_tasks:
file: "create_user.yml"
apply:
tags: create-user
@ -54,7 +54,7 @@
- create-user
# Purge local/remote media if called
- include_tasks:
- include_tasks:
file: "purge_media_main.yml"
apply:
tags: purge-media
@ -63,7 +63,7 @@
- purge-media
# Purge Synapse database if called
- include_tasks:
- include_tasks:
file: "purge_database_main.yml"
apply:
tags: purge-database
@ -72,7 +72,7 @@
- purge-database
# Rotate SSH key if called
- include_tasks:
- include_tasks:
file: "rotate_ssh.yml"
apply:
tags: rotate-ssh
@ -81,16 +81,16 @@
- rotate-ssh
# Import configs, media repo from /chroot/backup import
- include_tasks:
- include_tasks:
file: "import_awx.yml"
apply:
tags: import-awx
when: run_setup|bool and matrix_awx_enabled|bool
tags:
- import-awx
# Perform extra self-check functions
- include_tasks:
- include_tasks:
file: "self_check.yml"
apply:
tags: self-check
@ -99,7 +99,7 @@
- self-check
# Create cached matrix_vars.yml file
- include_tasks:
- include_tasks:
file: "cache_matrix_variables.yml"
apply:
tags: always
@ -108,7 +108,7 @@
- always
# Configure SFTP so user can upload a static website or access the servers export
- include_tasks:
- include_tasks:
file: "customise_website_access_export.yml"
apply:
tags: setup-nginx-proxy
@ -117,7 +117,7 @@
- setup-nginx-proxy
# Additional playbook to set the variable file during Element configuration
- include_tasks:
- include_tasks:
file: "set_variables_element.yml"
apply:
tags: setup-client-element
@ -126,7 +126,7 @@
- setup-client-element
# Additional playbook to set the variable file during Mailer configuration
- include_tasks:
- include_tasks:
file: "set_variables_mailer.yml"
apply:
tags: setup-mailer
@ -135,7 +135,7 @@
- setup-mailer
# Additional playbook to set the variable file during Element configuration
- include_tasks:
- include_tasks:
file: "set_variables_element_subdomain.yml"
apply:
tags: setup-client-element-subdomain
@ -144,7 +144,7 @@
- setup-client-element-subdomain
# Additional playbook to set the variable file during Synapse configuration
- include_tasks:
- include_tasks:
file: "set_variables_synapse.yml"
apply:
tags: setup-synapse
@ -153,7 +153,7 @@
- setup-synapse
# Additional playbook to set the variable file during Jitsi configuration
- include_tasks:
- include_tasks:
file: "set_variables_jitsi.yml"
apply:
tags: setup-jitsi
@ -162,7 +162,7 @@
- setup-jitsi
# Additional playbook to set the variable file during Ma1sd configuration
- include_tasks:
- include_tasks:
file: "set_variables_ma1sd.yml"
apply:
tags: setup-ma1sd
@ -171,7 +171,7 @@
- setup-ma1sd
# Additional playbook to set the variable file during Corporal configuration
- include_tasks:
- include_tasks:
file: "set_variables_corporal.yml"
apply:
tags: setup-corporal
@ -180,7 +180,7 @@
- setup-corporal
# Additional playbook to set the variable file during Dimension configuration
- include_tasks:
- include_tasks:
file: "set_variables_dimension.yml"
apply:
tags: setup-dimension
@ -189,7 +189,7 @@
- setup-dimension
# Additional playbook to set the variable file during Synapse Admin configuration
- include_tasks:
- include_tasks:
file: "set_variables_synapse_admin.yml"
apply:
tags: setup-synapse-admin
@ -198,7 +198,7 @@
- setup-synapse-admin
# Additional playbook to set the variable file during Discord Appservice Bridge configuration
- include_tasks:
- include_tasks:
file: "bridge_discord_appservice.yml"
apply:
tags: bridge-discord-appservice
@ -207,7 +207,7 @@
- bridge-discord-appservice
# Delete AWX session token
- include_tasks:
- include_tasks:
file: "delete_session_token.yml"
apply:
tags: always
@ -216,7 +216,7 @@
- always
# Load newly formed matrix variables from AWX volume
- include_tasks:
- include_tasks:
file: "load_matrix_variables.yml"
apply:
tags: always

@ -9,20 +9,20 @@
- name: Include vars in matrix_vars.yml
include_vars:
file: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml'
no_log: True
no_log: true
- name: Ensure curl and jq intalled on target machine
apt:
pkg:
- curl
- jq
- curl
- jq
state: present
- name: Collect before shrink size of Synapse database
shell: du -sh /matrix/postgres/data
register: awx_db_size_before_stat
when: (awx_purge_mode.find("Perform final shrink") != -1)
no_log: True
no_log: true
- name: Collect the internal IP of the matrix-synapse container
shell: "/usr/bin/docker inspect --format '{''{range.NetworkSettings.Networks}''}{''{.IPAddress}''}{''{end}''}' matrix-synapse"
@ -34,7 +34,7 @@
curl -X POST -d '{"type":"m.login.password", "user":"admin-janitor", "password":"{{ awx_janitor_user_password }}"}' "{{ awx_synapse_container_ip.stdout }}:{{ matrix_synapse_container_client_api_port }}/_matrix/client/r0/login" | jq '.access_token'
when: (awx_purge_mode.find("No local users [recommended]") != -1) or (awx_purge_mode.find("Number of users [slower]") != -1) or (awx_purge_mode.find("Number of events [slower]") != -1)
register: awx_janitors_token
no_log: True
no_log: true
- name: Copy build_room_list.py script to target machine
copy:
@ -55,7 +55,7 @@
fetch:
src: /tmp/room_list_complete.json
dest: "/tmp/{{ subscription_id }}_room_list_complete.json"
flat: yes
flat: true
when: (awx_purge_mode.find("No local users [recommended]") != -1) or (awx_purge_mode.find("Number of users [slower]") != -1) or (awx_purge_mode.find("Number of events [slower]") != -1)
- name: Remove complete room list from target machine
@ -80,7 +80,7 @@
- name: Setting host fact awx_room_list_no_local_users
set_fact:
awx_room_list_no_local_users: "{{ lookup('file', '/tmp/{{ subscription_id }}_room_list_no_local_users.txt') }}"
no_log: True
no_log: true
when: (awx_purge_mode.find("No local users [recommended]") != -1) or (awx_purge_mode.find("Number of users [slower]") != -1) or (awx_purge_mode.find("Number of events [slower]") != -1)
- name: Purge all rooms with no local users
@ -113,7 +113,7 @@
set_fact:
awx_room_list_joined_members: "{{ lookup('file', '/tmp/{{ subscription_id }}_room_list_joined_members.txt') }}"
when: awx_purge_mode.find("Number of users [slower]") != -1
no_log: True
no_log: true
- name: Purge all rooms with more then N users
include_tasks: purge_database_users.yml
@ -138,7 +138,7 @@
set_fact:
awx_room_list_state_events: "{{ lookup('file', '/tmp/{{ subscription_id }}_room_list_state_events.txt') }}"
when: awx_purge_mode.find("Number of events [slower]") != -1
no_log: True
no_log: true
- name: Purge all rooms with more then N events
include_tasks: purge_database_events.yml
@ -161,17 +161,17 @@
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true
when: (awx_purge_mode.find("No local users [recommended]") != -1) or (awx_purge_mode.find("Number of users [slower]") != -1) or (awx_purge_mode.find("Number of events [slower]") != -1) or (awx_purge_mode.find("Skip purging rooms [faster]") != -1)
- name: Execute rust-synapse-compress-state job template
delegate_to: 127.0.0.1
awx.awx.tower_job_launch:
job_template: "{{ matrix_domain }} - 0 - Deploy/Update a Server"
wait: yes
wait: true
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true
when: (awx_purge_mode.find("No local users [recommended]") != -1) or (awx_purge_mode.find("Number of users [slower]") != -1) or (awx_purge_mode.find("Number of events [slower]") != -1) or (awx_purge_mode.find("Skip purging rooms [faster]") != -1)
- name: Revert 'Deploy/Update a Server' job template
@ -190,14 +190,14 @@
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true
when: (awx_purge_mode.find("No local users [recommended]") != -1) or (awx_purge_mode.find("Number of users [slower]") != -1) or (awx_purge_mode.find("Number of events [slower]") != -1) or (awx_purge_mode.find("Skip purging rooms [faster]") != -1)
- name: Ensure matrix-synapse is stopped
service:
name: matrix-synapse
state: stopped
daemon_reload: yes
daemon_reload: true
when: (awx_purge_mode.find("Perform final shrink") != -1)
- name: Re-index Synapse database
@ -208,7 +208,7 @@
service:
name: matrix-synapse
state: started
daemon_reload: yes
daemon_reload: true
when: (awx_purge_mode.find("Perform final shrink") != -1)
- name: Adjust 'Deploy/Update a Server' job template
@ -227,17 +227,17 @@
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true
when: (awx_purge_mode.find("Perform final shrink") != -1)
- name: Execute run-postgres-vacuum job template
delegate_to: 127.0.0.1
awx.awx.tower_job_launch:
job_template: "{{ matrix_domain }} - 0 - Deploy/Update a Server"
wait: yes
wait: true
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true
when: (awx_purge_mode.find("Perform final shrink") != -1)
- name: Revert 'Deploy/Update a Server' job template
@ -256,7 +256,7 @@
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true
when: (awx_purge_mode.find("Perform final shrink") != -1)
- name: Cleanup room_list files
@ -264,13 +264,13 @@
shell: |
rm /tmp/{{ subscription_id }}_room_list*
when: (awx_purge_mode.find("No local users [recommended]") != -1) or (awx_purge_mode.find("Number of users [slower]") != -1) or (awx_purge_mode.find("Number of events [slower]") != -1)
ignore_errors: yes
ignore_errors: true
- name: Collect after shrink size of Synapse database
shell: du -sh /matrix/postgres/data
register: awx_db_size_after_stat
when: (awx_purge_mode.find("Perform final shrink") != -1)
no_log: True
no_log: true
- name: Print total number of rooms processed
debug:

@ -1,3 +1,4 @@
---
- name: Ensure dateutils is installed in AWX
delegate_to: 127.0.0.1
@ -8,13 +9,13 @@
- name: Include vars in matrix_vars.yml
include_vars:
file: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/matrix_vars.yml'
no_log: True
no_log: true
- name: Ensure curl and jq intalled on target machine
apt:
pkg:
- curl
- jq
- curl
- jq
state: present
- name: Collect the internal IP of the matrix-synapse container
@ -25,7 +26,7 @@
shell: |
curl -XPOST -d '{"type":"m.login.password", "user":"admin-janitor", "password":"{{ awx_janitor_user_password }}"}' "{{ awx_synapse_container_ip.stdout }}:{{ matrix_synapse_container_client_api_port }}/_matrix/client/r0/login" | jq '.access_token'
register: awx_janitors_token
no_log: True
no_log: true
- name: Generate list of dates to purge to
delegate_to: 127.0.0.1
@ -37,16 +38,16 @@
register: awx_local_media_size_before
when: awx_purge_media_type == "Local Media"
async: 600
ignore_errors: yes
no_log: True
ignore_errors: true
no_log: true
- name: Calculate initial size of remote media repository
shell: du -sh /matrix/synapse/storage/media-store/remote*
register: awx_remote_media_size_before
when: awx_purge_media_type == "Remote Media"
async: 600
ignore_errors: yes
no_log: True
async: 600
ignore_errors: true
no_log: true
- name: Purge local media with loop
include_tasks: purge_media_local.yml
@ -62,15 +63,15 @@
shell: du -sh /matrix/synapse/storage/media-store/local*
register: awx_local_media_size_after
when: awx_purge_media_type == "Local Media"
ignore_errors: yes
no_log: True
ignore_errors: true
no_log: true
- name: Calculate final size of remote media repository
shell: du -sh /matrix/synapse/storage/media-store/remote*
register: awx_remote_media_size_after
when: awx_purge_media_type == "Remote Media"
ignore_errors: yes
no_log: True
ignore_errors: true
no_log: true
- name: Print size of local media repository before purge
debug:

@ -4,7 +4,7 @@
authorized_key:
user: root
state: present
exclusive: yes
exclusive: true
key: "{{ lookup('file', '/var/lib/awx/projects/hosting/client_public.key') }}"
- name: Delete the AWX session token for executing modules

@ -25,53 +25,53 @@
shell: |
curl -s localhost:9000 | grep "^synapse_admin_mau_current "
register: awx_mau_stat
no_log: True
no_log: true
- name: Calculate CPU usage statistics
shell: iostat -c
register: awx_cpu_usage_stat
no_log: True
no_log: true
- name: Calculate RAM usage statistics
shell: free -mh
register: awx_ram_usage_stat
no_log: True
no_log: true
- name: Calculate free disk space
shell: df -h
register: awx_disk_space_stat
no_log: True
no_log: true
- name: Calculate size of Synapse database
shell: du -sh /matrix/postgres/data
register: awx_db_size_stat
no_log: True
no_log: true
- name: Calculate size of local media repository
shell: du -sh /matrix/synapse/storage/media-store/local*
register: awx_local_media_size_stat
async: 600
ignore_errors: yes
no_log: True
ignore_errors: true
no_log: true
- name: Calculate size of remote media repository
shell: du -sh /matrix/synapse/storage/media-store/remote*
register: awx_remote_media_size_stat
async: 600
ignore_errors: yes
no_log: True
ignore_errors: true
no_log: true
- name: Calculate docker container statistics
shell: docker stats --all --no-stream
register: awx_docker_stats
ignore_errors: yes
no_log: True
ignore_errors: true
no_log: true
- name: Print size of remote media repository
debug:
msg: "{{ awx_remote_media_size_stat.stdout.split('\n') }}"
when: awx_remote_media_size_stat is defined
- name: Print size of local media repository
debug:
msg: "{{ awx_local_media_size_stat.stdout.split('\n') }}"

@ -235,9 +235,9 @@
credential: "{{ member_id }} - AWX SSH Key"
survey_enabled: true
survey_spec: "{{ lookup('file', '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_corporal.json') }}"
become_enabled: yes
become_enabled: true
state: present
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true

@ -3,18 +3,18 @@
- name: Include vars in matrix_vars.yml
include_vars:
file: '{{ awx_cached_matrix_vars }}'
no_log: True
no_log: true
- name: Install jq and curl on remote machine
apt:
name:
name:
- jq
- curl
state: present
- name: Collect access token of @admin-dimension user
shell: |
curl -X POST --header 'Content-Type: application/json' -d '{ "identifier": { "type": "m.id.user","user": "admin-dimension" }, "password": "{{ awx_dimension_user_password }}", "type": "m.login.password"}' 'https://matrix.{{ matrix_domain }}/_matrix/client/r0/login' | jq -c '. | {access_token}' | sed 's/.*\":\"//' | sed 's/\"}//'
curl -X POST --header 'Content-Type: application/json' -d '{ "identifier": { "type": "m.id.user","user": "admin-dimension"}, "password": "{{ awx_dimension_user_password }}", "type": "m.login.password"}' 'https://matrix.{{ matrix_domain }}/_matrix/client/r0/login' | jq -c '. | {access_token}' | sed 's/.*\":\"//' | sed 's/\"}//'
register: awx_dimension_user_access_token
- name: Record Synapse variables locally on AWX
@ -27,7 +27,7 @@
with_dict:
'matrix_dimension_enabled': '{{ matrix_dimension_enabled }}'
'matrix_dimension_access_token': '"{{ awx_dimension_user_access_token.stdout }}"'
- name: Set final users list if users are defined
set_fact:
awx_dimension_users_final: "{{ awx_dimension_users }}"
@ -80,7 +80,7 @@
- name: Copy new 'Configure Dimension' survey.json to target machine
copy:
src: '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_dimension.json'
dest: '/matrix/awx/configure_dimension.json'
dest: '/matrix/awx/configure_dimension.json'
mode: '0660'
- name: Recreate 'Configure Dimension' job template
@ -97,9 +97,9 @@
credential: "{{ member_id }} - AWX SSH Key"
survey_enabled: true
survey_spec: "{{ lookup('file', '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_dimension.json') }}"
become_enabled: yes
become_enabled: true
state: present
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true

@ -172,9 +172,9 @@
credential: "{{ member_id }} - AWX SSH Key"
survey_enabled: true
survey_spec: "{{ lookup('file', '/var/lib/awx/projects/clients/{{ member_id }}/{{ subscription_id }}/configure_element.json') }}"
become_enabled: yes
become_enabled: true
state: present
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true

@ -9,7 +9,7 @@
insertafter: '# Element Settings Start'
with_dict:
'matrix_server_fqn_element': "{{ awx_element_subdomain | trim }}.{{ matrix_domain }}"
- name: Save new 'Configure Element Subdomain' survey.json to the AWX tower, template
delegate_to: 127.0.0.1
template:
@ -40,4 +40,4 @@
verbosity: 1
tower_host: "https://{{ awx_host }}"
tower_oauthtoken: "{{ awx_session_token.ansible_facts.tower_token.token }}"
validate_certs: yes
validate_certs: true