host agent 최신 버전 기준 반영

This commit is contained in:
ByeonJungHun
2025-01-10 15:50:07 +09:00
parent b2ce1e996a
commit 75d1d9063e
3 changed files with 11 additions and 60 deletions

View File

@@ -11,9 +11,17 @@
dest: "{{ EXEM_HOME }}"
mode: '0755'
- name: Create Agent Config File
ansible.builtin.template:
src: "{{ item }}.j2"
dest: "{{ EXEM_HOME }}/host"
mode: '0755'
with_items:
- host_config
- name: Install Start exemONE Host-Agent
ansible.builtin.shell: |
{{ EXEM_HOME }}/host/setup_exem-host-agent_3.0.17.bin {{ RECEIVER_ADDR }} {{ RECEIVER_PORT | default('9010') }}
{{ EXEM_HOME }}/host/setup_exem-host-agent_3.0.17.bin ./host_config
args:
chdir: "{{ EXEM_HOME }}/host"

View File

@@ -1,59 +0,0 @@
---
- name: Create exemONE Agent Directory
ansible.builtin.file:
path: "{{ EXEM_HOME }}"
state: directory
mode: '0755'
- name: Copy exemONE Host-Agent File
ansible.builtin.copy:
src: "{{ role_path }}/files/host"
dest: "{{ EXEM_HOME }}"
- name: Create Agent Script
ansible.builtin.template:
src: "{{ item }}.j2"
dest: "{{ EXEM_HOME }}/host/script/{{ item }}"
mode: '0755'
with_items:
- binary_start.sh
- binary_stop.sh
- systemctl_stop.sh
- systemctl_enable.sh
- name: Create Service Script
ansible.builtin.template:
src: "{{ item }}.j2"
dest: "{{ EXEM_HOME }}/host/service/{{ item }}"
mode: '0755'
with_items:
- exem-host-agent
- exem-host-agent.service
- name: Move exem-host-agent Binary
ansible.builtin.copy:
src: "{{ EXEM_HOME }}/host/os_binary/exem-host-agent_linux-2.6-x86_64-64"
dest: "{{ EXEM_HOME }}/host/bin/exem-host-agent"
remote_src: yes
mode: '0755'
- name: Setting SELinux
ansible.builtin.shell: |
chcon -t bin_t {{ EXEM_HOME }}/host/script/binary_start.sh
chcon -R -t var_run_t {{ EXEM_HOME }}/host/data/
chcon -R -t var_run_t {{ EXEM_HOME }}/host/service/
- name: Create Symbolic link
ansible.builtin.file:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
state: link
loop:
- { src: "{{ EXEM_HOME }}/host/service/exem-host-agent.service", dest: /etc/systemd/system/exem-host-agent.service }
- { src: "{{ EXEM_HOME }}/host/service/exem-host-agent", dest: /usr/bin/exem-host-agent }
- name: exem-host-agent start and enable
ansible.builtin.service:
name: exem-host-agent
state: started
enabled: yes