tpcc and host-agent ansible installer add
This commit is contained in:
9
roles/jspd/tasks/cmoa.yaml
Normal file
9
roles/jspd/tasks/cmoa.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: host insert
|
||||
shell: |
|
||||
PG=$(kubectl get po -n imxc | grep postgres | awk '{print $1}')
|
||||
for ip in {{ groups['containerd'] | union(groups['docker']) | union(groups['crio']) }}; do
|
||||
ip_formatted=$(echo "$ip" | sed -e 's/[][]//g' -e 's/,//g')
|
||||
kubectl exec -it -n imxc $PG -- psql -U admin postgresdb --command="INSERT INTO auth_resource3 VALUES (nextval('hibernate_sequence'), 'host|$ip_formatted:9100', false, null);"
|
||||
done
|
||||
when: inventory_hostname == groups['cmoa-master'][0]
|
||||
Reference in New Issue
Block a user