Commit Graph

19 Commits

Author SHA1 Message Date
Slavi Pantaleev 80c2624454 Add add-inventory-host command for bootstrapping the inventory
Running `just add-inventory-host example.com 1.2.3.4` (or
`make add-inventory-host domain=example.com ip=1.2.3.4`) adds a new
host to the inventory, creating inventory/hosts and
inventory/host_vars/matrix.DOMAIN/vars.yml from the example files,
with strong secrets generated automatically.

Existing configuration is never overwritten. The command refuses to
run if the host is already in the inventory, so it can also be used
for adding more hosts later.

Based on the idea proposed in
https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/4682 by @Ser5

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 16:08:09 +03:00
Slavi Pantaleev 312cfe9b41 Add prek-based pre-commit workflow 2026-03-22 16:44:04 +02:00
Slavi Pantaleev 4a8df13854 Auto-detect conditional restart based on playbook tags and add CHANGELOG entry
- Override devture_systemd_service_manager_conditional_restart_enabled in
  group_vars based on ansible_run_tags: disabled when setup-* tags are used,
  enabled otherwise. This replaces the --extra-vars hack in the justfile and
  ensures consistent behavior for both `just` and raw `ansible-playbook` users.
- Revert justfile setup-all to its original form (no --extra-vars needed).
- Update docs/just.md to reflect tag-agnostic behavior.
- Add CHANGELOG.md entry documenting the conditional restart feature.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 14:21:07 +02:00
Slavi Pantaleev 9accc848c4 Wire conditional restart for Traefik and update setup-all to force restarts
- Traefik's service list entry now uses the `traefik_restart_necessary`
  variable (computed by the Traefik role) instead of hardcoded `true`,
  so it is only restarted when its config, systemd unit, or image changed.

- `just setup-all` now passes
  `devture_systemd_service_manager_conditional_restart_enabled=false`
  to force unconditional restarts, matching its "full setup" semantics.

- Document the conditional restart behavior in docs/just.md.

Some benchmarks follow for `just install-service traefik -l matrix.example.com`
when Traefik settings did not change and a restart is not really necessary:

- Before:
  - total time: 56 seconds 🐌
  - Traefik restarted: yes 
  - Services that depend on Traefik restarted: yes; all of them restarted 

- After:
  - total time: 27 seconds 
  - Traefik restarted: no 
  - Services that depend on Traefik restarted: no; none restarted 

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 12:32:02 +02:00
Slavi Pantaleev ecf9befc32 Adapt to the all-at-once restart mode default in systemd_service_manager v2.0.0-0
- `install-service` no longer forces `one-by-one` restart mode

- the coturn priority condition is flipped: only `one-by-one` mode
  needs the delayed priority (1500); all other modes (including
  the new `all-at-once` default) use the normal priority (900)

Ref:

- https://github.com/devture/com.devture.ansible.role.systemd_service_manager/commit/d42cd9204548d47c1368badc9b152f4261093398
- https://github.com/devture/com.devture.ansible.role.systemd_service_manager/blob/f3e658cca3b41d3aedc81aa77cf22bafd9ca4d0f/docs/restart-mode-comparison.md
- https://github.com/devture/com.devture.ansible.role.systemd_service_manager/commit/36445fb41931c6baa3c44818877def4a162e5db4
- 750cb7e29e
2026-02-10 16:41:41 +02:00
Chippit 3c3cc2bf7d Fixed justfile not working with spaces in path 2025-09-21 14:11:24 +03:00
Suguru Hirahara 92adfb50e7 Add license information to some files on the top level directory
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2025-03-03 12:14:55 +09:00
Aine 8ab4315484 make justfile compatible with different 'just' implementations, fixes #3866 2024-12-17 11:15:25 +02:00
Suguru Hirahara c1c1b3ada0 Replace triple dots with horizontal ellipsis (U+2026)
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-12-06 13:34:50 +09:00
Aine c4d07f8b08 Update agru url in justfile 2024-08-11 22:38:44 +03:00
Aine b347d98161 rewrite just update command to provide a one-line command to update everything (#3410)
* rewrite `just update` command to provide a one-line command to update everything

* update prefix

* uncomment update-self

* Revert requirements.yml updates not belonging to this PR

* Justfile and documentation updates to make things clearer

---------

Co-authored-by: Slavi Pantaleev <slavi@devture.com>
2024-07-15 07:57:08 +03:00
Slavi Pantaleev 367af472ea Add support for bridging to Facebook Messenger and Instagram via mautrix-meta
Related to: https://github.com/mautrix/facebook/issues/332

Fixes: https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3138
2024-02-19 10:25:00 +02:00
Slavi Pantaleev 9efd5229ad Remove time from "just run" command
People who need to time things should do it themselves, explicitly.
Forcing `time` on people is a little rude.

Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2618
2023-04-01 06:34:59 +03:00
Slavi Pantaleev d25e7744d9 Always restart services one by one when doing install-service
This way, something like `just install-service postgres` will
definitely do a `restart` and not a `stop` + `start` (which may leave
dependant services stopped).

This has potentially been addressed by
https://github.com/devture/com.devture.ansible.role.systemd_service_manager/commit/7acb5f4b85de1a7009b149f5b6ee3a6eef203047
as well.
2023-03-28 10:55:11 +03:00
Slavi Pantaleev 413049feea Remove shell configuration for better compatibility
Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2604
2023-03-26 14:12:29 +03:00
Aine 34a03cf732 safely integrate agru, format justfile, format requirements.yml 2023-03-25 17:47:13 +02:00
Slavi Pantaleev abf96569e0 Add extra_args support to install-service justfile command
It's now possible to do: `just install-service prometheus -l host.example.com`
2023-03-20 15:05:19 +02:00
Slavi Pantaleev 3e84e354a8 Add "install-service" justfile command
It should be noted that this cannot be used for the initial install
of services which require a database or have other dependencies.
Those would typically need to invoke the playbook with
`--tags=install-postgres,install-SERVICE`, etc.

The purpose of this shortcut is to easily rebuild and restart
a single serice subsequently. For those cases, often times there's no need to
reinitialize the database and other components and simply running a
single component's tasks is enough.
2023-03-19 08:12:37 +02:00
Slavi Pantaleev a529bca756 Add justfile
We keep the Makefile for now, but don't mention it to new
users anymore.
2023-01-11 15:12:05 +02:00