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

49 строки
1.9 KiB

  1. # Shows help
  2. default:
  3. @just --list --justfile {{ justfile() }}
  4. # Pulls external Ansible roles
  5. roles:
  6. rm -rf roles/galaxy
  7. ansible-galaxy install -r requirements.yml -p roles/galaxy/ --force
  8. # Runs ansible-lint against all roles in the playbook
  9. lint:
  10. ansible-lint
  11. # Runs the playbook with --tags=install-all,ensure-matrix-users-created,start and optional arguments
  12. install-all *extra_args: (run-tags "install-all,ensure-matrix-users-created,start" extra_args)
  13. # Runs installation tasks for a single service
  14. install-service service *extra_args:
  15. just --justfile {{ justfile() }} run --tags=install-{{ service }},start-group --extra-vars=group={{ service }} {{ extra_args }}
  16. # Runs the playbook with --tags=setup-all,ensure-matrix-users-created,start and optional arguments
  17. setup-all *extra_args: (run-tags "setup-all,ensure-matrix-users-created,start" extra_args)
  18. # Runs the playbook with the given list of arguments
  19. run +extra_args:
  20. time ansible-playbook -i inventory/hosts setup.yml {{ extra_args }}
  21. # Runs the playbook with the given list of comma-separated tags and optional arguments
  22. run-tags tags *extra_args:
  23. just --justfile {{ justfile() }} run --tags={{ tags }} {{ extra_args }}
  24. # Runs the playbook in user-registration mode
  25. register-user username password admin_yes_or_no *extra_args:
  26. time ansible-playbook -i inventory/hosts setup.yml --tags=register-user --extra-vars="username={{ username }} password={{ password }} admin={{ admin_yes_or_no }}" {{ extra_args }}
  27. # Starts all services
  28. start-all *extra_args: (run-tags "start-all" extra_args)
  29. # Starts a specific service group
  30. start-group group *extra_args:
  31. @just --justfile {{ justfile() }} run-tags start-group --extra-vars="group={{ group }}" {{ extra_args }}
  32. # Stops all services
  33. stop-all *extra_args: (run-tags "stop-all" extra_args)
  34. # Stops a specific service group
  35. stop-group group *extra_args:
  36. @just --justfile {{ justfile() }} run-tags stop-group --extra-vars="group={{ group }}" {{ extra_args }}