This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
galaxy-deployment-ansible-d…/Apache Ignite/2.15.0/ignite/role/tasks/deploy.yml

49 lines
1.3 KiB
YAML
Raw Normal View History

- block:
- name: Check the Zookeeper status
shell: netstat -anlp | egrep "2181" | grep LISTEN | wc -l
register: port_out
delegate_to: "{{ groups.zookeeper[0] }}"
- name: To terminate execution
fail:
msg: "Port 2181 of the zookeeper node is not monitored. The status may be abnormal"
run_once: true
delegate_to: 127.0.0.1
when: port_out.stdout != '1'
- name: Creating directory
file:
state: directory
path: '{{ deploy_dir }}/{{ container_name }}/{{ item.dir }}'
with_items:
- { dir: 'config' }
- name: unpack libs.zip
unarchive:
src: 'files/libs.zip'
dest: '{{ deploy_dir }}/{{ container_name }}/'
- name: Copying image to {{ deploy_dir }}/{{ container_name }}/
copy:
src: 'files/{{ image_name }}-{{ image_tag }}.tar'
dest: '{{ deploy_dir }}/{{ container_name }}/'
force: true
notify:
- Loading Image
- name: Copying config files
template:
src: '{{ item.src }}'
dest: '{{ item.dest }}'
mode: 0644
with_items:
- { src: 'docker-compose.yml.j2', dest: '{{ deploy_dir }}/{{ container_name }}/docker-compose.yml' }
- { src: 'default-config.xml.j2', dest: '{{ deploy_dir }}/{{ container_name }}/config/default-config.xml' }
notify:
- Start Container
- meta: flush_handlers