Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 

65 строки
2.5 KiB

  1. # Shows help
  2. default:
  3. @just --list --justfile {{ justfile() }}
  4. # Pulls external Ansible roles
  5. roles:
  6. #!/usr/bin/env sh
  7. if [ -x "$(command -v agru)" ]; then
  8. agru
  9. else
  10. rm -rf roles/galaxy
  11. ansible-galaxy install -r requirements.yml -p roles/galaxy/ --force
  12. fi
  13. # Updates requirements.yml if there are any new tags available. Requires agru
  14. update:
  15. @agru -u
  16. # Runs ansible-lint against all roles in the playbook
  17. lint:
  18. ansible-lint
  19. # Runs the playbook with --tags=install-all,ensure-matrix-users-created,start and optional arguments
  20. install-all *extra_args: (run-tags "install-all,ensure-matrix-users-created,start" extra_args)
  21. # Runs installation tasks for a single service
  22. install-service service *extra_args:
  23. just --justfile {{ justfile() }} run \
  24. --tags=install-{{ service }},start-group \
  25. --extra-vars=group={{ service }} \
  26. --extra-vars=devture_systemd_service_manager_service_restart_mode=one-by-one {{ extra_args }}
  27. # Runs the playbook with --tags=setup-all,ensure-matrix-users-created,start and optional arguments
  28. setup-all *extra_args: (run-tags "setup-all,ensure-matrix-users-created,start" extra_args)
  29. # Runs the playbook with the given list of arguments
  30. run +extra_args:
  31. ansible-playbook -i inventory/hosts setup.yml {{ extra_args }}
  32. # Runs the playbook with the given list of comma-separated tags and optional arguments
  33. run-tags tags *extra_args:
  34. just --justfile {{ justfile() }} run --tags={{ tags }} {{ extra_args }}
  35. # Runs the playbook in user-registration mode
  36. register-user username password admin_yes_or_no *extra_args:
  37. ansible-playbook -i inventory/hosts setup.yml --tags=register-user --extra-vars="username={{ username }} password={{ password }} admin={{ admin_yes_or_no }}" {{ extra_args }}
  38. # Starts all services
  39. start-all *extra_args: (run-tags "start-all" extra_args)
  40. # Starts a specific service group
  41. start-group group *extra_args:
  42. @just --justfile {{ justfile() }} run-tags start-group --extra-vars="group={{ group }}" {{ extra_args }}
  43. # Stops all services
  44. stop-all *extra_args: (run-tags "stop-all" extra_args)
  45. # Stops a specific service group
  46. stop-group group *extra_args:
  47. @just --justfile {{ justfile() }} run-tags stop-group --extra-vars="group={{ group }}" {{ extra_args }}
  48. # Rebuilds the mautrix-meta-instagram Ansible role using the mautrix-meta-messenger role as a source
  49. rebuild-mautrix-meta-instagram:
  50. /bin/bash {{ justfile_directory() }}/bin/rebuild-mautrix-meta-instagram.sh {{ justfile_directory() }}/roles/custom