ndm agent 추가

This commit is contained in:
ByeonJungHun
2024-03-19 16:10:20 +09:00
parent 90987a8db6
commit 25ea47dbe5
24 changed files with 926 additions and 13 deletions

View File

@@ -11,3 +11,7 @@
- agent_list | select('search', 'container-agent') | list | count > 0
- "'container_agent' in group_names"
- include_tasks: ndm-agent.yml
when:
- agent_list | select('search', 'ndm-agent') | list | count > 0
- "'ndm_agent' in group_names"

View File

@@ -0,0 +1,37 @@
---
- name: Create exemONE Agent Directory
ansible.builtin.file:
path: "{{ EXEM_HOME }}"
state: directory
mode: '0755'
- name: Copy exemONE NDM-Agent File
ansible.posix.synchronize:
src: "{{ role_path }}/files/ndm"
dest: "{{ EXEM_HOME }}"
- name: Create Agent Script
ansible.builtin.template:
src: "{{ item }}.j2"
dest: "{{ EXEM_HOME }}/ndm/bin/{{ item }}"
mode: '0740'
with_items:
- ndm-ctl
- ndm-svc
- reg.env
- start
- stop
- name: Create Agent Conf
ansible.builtin.template:
src: "{{ item }}.j2"
dest: "{{ EXEM_HOME }}/ndm/conf/{{ item }}"
mode: '0755'
with_items:
- ndm.conf
- name: chmod change
ansible.builtin.shell: "chmod -R 740 {{ EXEM_HOME }}/ndm"
- name: exem-ndm-agent start
ansible.builtin.shell: "nohup {{ EXEM_HOME }}/ndm/bin/start"

View File

@@ -13,9 +13,7 @@
when: ansible_distribution_major_version == '7'
- name: install rsync os version 7
ansible.builtin.yum:
name: "{{ EXEM_HOME }}/rhel7.rpm"
state: present
ansible.builtin.shell: "yum localinstall -y {{ EXEM_HOME }}/rhel7.rpm"
when: ansible_distribution_major_version == '7'
- name: Copy rsync install rpm OS - 8
@@ -26,9 +24,7 @@
when: ansible_distribution_major_version == '8'
- name: install rsync os version 8
ansible.builtin.yum:
name: "{{ EXEM_HOME }}/rhel8.rpm"
state: present
ansible.builtin.shell: "yum localinstall -y {{ EXEM_HOME }}/rhel8.rpm"
when: ansible_distribution_major_version == '8'
- name: Copy rsync install rpm OS - 9
@@ -39,7 +35,5 @@
when: ansible_distribution_major_version == '9'
- name: install rsync os version 9
ansible.builtin.yum:
name: "{{ role_path }}/files/rpm/rhel9.rpm"
state: present
ansible.builtin.shell: "yum localinstall -y {{ EXEM_HOME }}/rhel9.rpm"
when: ansible_distribution_major_version == '9'