提交各组件部署Ansible剧本初版

This commit is contained in:
qidaijie
2024-01-18 15:35:33 +08:00
parent f0bd05d565
commit 0cc392df5c
262 changed files with 15927 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
- name: Loading Image
docker_image:
name: '{{ image_name }}'
tag: '{{ image_tag }}'
load_path: '{{ deploy_dir }}/{{ container_name }}/{{ image_name }}-{{ image_tag }}.tar'
source: load
force_tag: yes
force_source: yes
timeout: 300
- name: Stop Container
docker_container:
name: '{{ container_name }}'
state: absent
- name: Start Container
docker_compose:
project_src: '{{ deploy_dir }}/{{ container_name }}/'
- name: Removing Image
docker_image:
name: '{{ image_name }}'
tag: '{{ image_tag }}'
state: absent
- name: Loading Exporter Image
docker_image:
name: 'kafka_exporter'
tag: 'v2.0'
load_path: '{{ deploy_dir }}/{{ container_name }}/monitor/kafka_exporter-v2.0.tar'
source: load
force_tag: yes
force_source: yes
timeout: 300
- name: Start Exporter Container
docker_compose:
project_src: '{{ deploy_dir }}/{{ container_name }}/monitor/'