Ansible: точечные фиксы идемпотентности

- backup-targets собирается одной copy вместо lineinfile в цикле: теперь
  удаление цели из списка реально убирает строку из файла (7 плейбуков)
- netdata: getent вместо grep по /etc/group, ушёл бессмысленный changed_when
  и мёртвый фолбэк PGID
- исправлены копипастные имена play в wanderer и remove-user-and-app
This commit is contained in:
av
2026-07-24 21:26:39 +03:00
parent 4d976585ec
commit 564432755d
12 changed files with 54 additions and 92 deletions
+5 -7
View File
@@ -43,15 +43,13 @@
state: absent
- name: "Create backup targets file"
ansible.builtin.lineinfile:
path: "{{ base_dir }}/backup-targets"
line: "{{ item }}"
create: true
ansible.builtin.copy:
dest: "{{ base_dir }}/backup-targets"
content: |
{{ data_dir }}
owner: "{{ app_user }}"
group: "{{ app_user }}"
mode: "0750"
loop:
- "{{ data_dir }}"
mode: "0640"
- name: "Copy docker compose file"
ansible.builtin.template: