21 lines
796 B
YAML
21 lines
796 B
YAML
---
|
|
- name: host agent install setting [1] - containerd
|
|
lineinfile:
|
|
path: /root/host-agent/nerdctl-host/metric-agent.yml
|
|
regexp: 'targets'
|
|
line: " - targets: ['{{ ansible_default_ipv4.address }}:9100']"
|
|
when:
|
|
- inventory_hostname in groups['containerd']
|
|
|
|
- name: host agent install setting [2] - containerd
|
|
shell: |
|
|
sed -i "s/10.10.34.142/{{ hostvars[groups['cmoa-master'][0]]['ansible_default_ipv4']['address'] }}/" /root/host-agent/nerdctl-host/setup_nerdctl.sh
|
|
sed -i "s/rel3.4.6/rel{{ VERSION }}/" /root/host-agent/nerdctl-host/setup_nerdctl.sh
|
|
when:
|
|
- inventory_hostname in groups['containerd']
|
|
|
|
- name: host agent install - containerd
|
|
shell: sh /root/host-agent/nerdctl-host/setup_nerdctl.sh
|
|
when:
|
|
- inventory_hostname in groups['containerd']
|