Files
pet-project-server/docs/backlog/ansible-inventory-hostvars.md
av 4d976585ec Ansible: единственный инвентарь production.yml
- production.yml переписан на живой Timeweb-хост, timeweb.yml удалён,
  HOSTS_FILE в tasks.py и примеры в README поправлены
- host-vars application_dir и mount_external_storage не перенесены: это
  наследие YC-диска, а после переезда в group_vars инвентарь их перебивает
- ansible.cfg: inventory по умолчанию, чтобы забытый -i не уводил в никуда
2026-07-24 21:15:12 +03:00

16 lines
891 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Инвентарь: `host_vars`, именованные группы, точечный `become`
**Приоритет:** низкий
- **`production.yml`** объявляет хост `server` под `ungrouped:`,
хост-специфичные данные (`ansible_host`, `ansible_user`, `ansible_become`)
вписаны инлайн. Конвенциональнее — `host_vars/server.yml` и хост в именованной
группе, а не в `ungrouped`.
- `ansible_become: true` глобально — всё бежит под root. Для личного сервера
прагматично; точечный `become`/`become_user` ближе к наименьшим привилегиям, но
это низкий приоритет.
Контекст: [docs/drafts/ansible-review.md](../drafts/ansible-review.md) §6.
Связано: production.yml.