tpcc and host-agent ansible installer add
This commit is contained in:
20
roles/jspd/tasks/containerd.yaml
Normal file
20
roles/jspd/tasks/containerd.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
- 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']
|
||||
Reference in New Issue
Block a user