DB 에이전트 설치 방식 변경

This commit is contained in:
ByeonJungHun
2024-01-19 10:06:35 +09:00
parent 2a62963b9c
commit b16fca2fbd
22 changed files with 231 additions and 412 deletions

View File

@@ -75,6 +75,20 @@
with_items:
- "{{ datasaker_agents }}"
ignore_errors: true
when:
- "item != 'dsk-maria-agent' and item != 'dsk-mysql-agent' and item != 'dsk-postgres-agent'"
- name: "Install datasaker database agent"
apt:
name: "{{ item }}"
state: latest
update_cache: yes
with_items:
- "{{ datasaker_agents }}"
ignore_errors: true
when:
- "item != 'dsk-maria-agent' and item != 'dsk-mysql-agent' and item != 'dsk-postgres-agent'"
- "'database' in group_names"
- name: "Check datasaker Agent"
include_tasks: check-agent.yml
@@ -99,4 +113,18 @@
state: restarted
with_items:
- "{{ datasaker_agents }}"
ignore_errors: true
ignore_errors: true
when:
- "item != 'dsk-maria-agent' and item != 'dsk-mysql-agent' and item != 'dsk-postgres-agent'"
- name: "Restart dsk-database-agent service"
ansible.builtin.systemd:
name: "{{ item }}"
enabled: true
state: restarted
with_items:
- "{{ datasaker_agents }}"
ignore_errors: true
when:
- "item != 'dsk-maria-agent' and item != 'dsk-mysql-agent' and item != 'dsk-postgres-agent'"
- "'database' in group_names"