host agent 최신 버전 기준 반영
This commit is contained in:
@@ -11,9 +11,17 @@
|
|||||||
dest: "{{ EXEM_HOME }}"
|
dest: "{{ EXEM_HOME }}"
|
||||||
mode: '0755'
|
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
|
- name: Install Start exemONE Host-Agent
|
||||||
ansible.builtin.shell: |
|
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:
|
args:
|
||||||
chdir: "{{ EXEM_HOME }}/host"
|
chdir: "{{ EXEM_HOME }}/host"
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
|
||||||
2
installer/roles/one_agent/templates/host_config.j2
Normal file
2
installer/roles/one_agent/templates/host_config.j2
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
RECEIVER_IP={{ RECEIVER_ADDR }}
|
||||||
|
RECEIVER_PORT={{ RECEIVER_PORT | default('9009') }}
|
||||||
Reference in New Issue
Block a user