From c2ced8f0a47b5268246c534b6176bccb8875e74a Mon Sep 17 00:00:00 2001 From: wangjian Date: Thu, 1 Aug 2024 11:36:09 +0800 Subject: [PATCH] add fleet for kibana add fleet docker service --- playbook/standalone.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/playbook/standalone.yml b/playbook/standalone.yml index f0889e8..519b79c 100644 --- a/playbook/standalone.yml +++ b/playbook/standalone.yml @@ -69,3 +69,25 @@ when: arch == aarch64 - name: start kibana shell: nohup /opt/kibana-7.17.16/bin/kibana --allow-root & + - name: install docker + dnf: + name: docker + state: present + - name: pull fleet for kibana + shell: docker pull docker.elastic.co/package-registry/distribution:7.17.23 + - name: Save the fleet Docker image locally + shell: docker save -o package-registry-7.17.23.tar docker.elastic.co/package-registry/distribution:7.17.23 + - name: Transfer the image to the air-gapped environment and load it + shell: docker load -i package-registry-7.17.23.tar + - name: Run the Elastic Package Registry + shell: docker run -it -p 8080:8080 docker.elastic.co/package-registry/distribution:7.17.23 + - name: change kibana config for fleet + lineinfile: + path: /opt/kibana-7.17.16/config/kibana.yml + regexp: '^#?xpack\.fleet\.registryUrl:\s*' + line: 'xpack.fleet.registryUrl: http://127.0.0.1:8080' + backup: yes + - name: stop kibana + shell: kill -9 $(ps -ef | grep "nohup /opt/kibana-7.17.16/bin/kibana --allow-root &" | grep -v grep | awk '{print $2}') + - name: start kibana + shell: nohup /opt/kibana-7.17.16/bin/kibana --allow-root & \ No newline at end of file -- Gitee