view /ru/declarative/file
Файл
Модули / file
Управляет файлом из запечатанного ресурса или ограниченного шаблона.
Пример YAML
- name: Установить конфигурацию
file:
path: /etc/example/app.conf
state: present
asset: assets/app.conf
mode: "0644"
notify: [restart-example]Поля схемы
| Поле | Тип | Обязательно | Ограничение |
|---|---|---|---|
path | string | да | Absolute managed path. |
state | string | да | Desired file state.present | absent |
asset | string | — | Path to a sealed project asset. |
template | string | — | Restricted scalar template source. |
owner | string | — | Required owner name. |
group | string | — | Required group name. |
mode | string | — | Four-digit octal mode. |
notify | array | — | Handler names notified after a verified change. |