fixed ansible playbooks

This commit is contained in:
IcyAltair 2025-12-26 18:49:51 +03:00
parent 68d4976a97
commit e26d4d72e5
14 changed files with 15 additions and 20 deletions

View file

@ -0,0 +1 @@
# for docker swarm token

View file

@ -1,5 +1,5 @@
- name: check images on slave nodes - name: check images on slave nodes
hosts: fields hosts: "{{ hosts }}"
gather_facts: False gather_facts: False
roles: roles:
- { role: ../roles/images } - { role: ../roles/images }

View file

@ -1,5 +1,5 @@
- name: check internet on slave nodes - name: check internet on slave nodes
hosts: fields hosts: "{{ hosts }}"
gather_facts: False gather_facts: False
roles: roles:
- { role: ../roles/internet } - { role: ../roles/internet }

View file

@ -1,5 +1,5 @@
- name: check ROM memory on slave nodes - name: check ROM memory on slave nodes
hosts: fields hosts: "{{ hosts }}"
gather_facts: False gather_facts: False
roles: roles:
- { role: ../roles/memory } - { role: ../roles/memory }

View file

@ -1,5 +1,5 @@
- name: check modules running on slave nodes - name: check modules running on slave nodes
hosts: fields hosts: "{{ hosts }}"
gather_facts: False gather_facts: False
roles: roles:
- { role: ../roles/check } - { role: ../roles/check }

View file

@ -1,5 +1,5 @@
- name: check docker engine - name: check docker engine
hosts: fields hosts: "{{ hosts }}"
gather_facts: False gather_facts: False
roles: roles:
- { role: ../roles/docker } - { role: ../roles/docker }

View file

@ -1,5 +1,5 @@
- name: delete images on slave nodes - name: delete images on slave nodes
hosts: fields hosts: "{{ hosts }}"
gather_facts: False gather_facts: False
roles: roles:
- { role: ../roles/delete } - { role: ../roles/delete }

View file

@ -1,5 +1,5 @@
- name: login on slave nodes - name: login on slave nodes
hosts: fields hosts: "{{ hosts }}"
gather_facts: False gather_facts: False
vars: vars:
token: "{{ token }}" token: "{{ token }}"

View file

@ -1,5 +1,5 @@
- name: check utilization of slave nodes - name: check utilization of slave nodes
hosts: fields hosts: "{{ hosts }}"
gather_facts: False gather_facts: False
roles: roles:
- { role: ../roles/more_check } - { role: ../roles/more_check }

View file

@ -1,5 +0,0 @@
- name: ping slave nodes
hosts: fields
gather_facts: False
roles:
- { role: ../roles/ping }

View file

@ -1,5 +1,5 @@
- name: pull image on slave nodes - name: pull image on slave nodes
hosts: fields hosts: "{{ hosts }}"
gather_facts: False gather_facts: False
vars: vars:
image: "{{ image }}" image: "{{ image }}"

View file

@ -1,11 +1,10 @@
- name: run module on slave node - name: run module on slave node
hosts: fields hosts: "{{ hosts }}"
gather_facts: False gather_facts: False
vars: vars:
image: "{{ image }}" image: "{{ image }}"
port: "{{ port }}" port: "{{ port }}"
size: "{{ size }}" path: "{{ path }}"
vars_files: env_file: "{{ env_file}}"
- ../env/minio_params.yml
roles: roles:
- { role: ../roles/run } - { role: ../roles/run }

View file

@ -1,5 +1,5 @@
- name: stop module on slave node - name: stop module on slave node
hosts: fields hosts: "{{ hosts }}"
gather_facts: False gather_facts: False
vars: vars:
module_port: "{{ module_port }}" module_port: "{{ module_port }}"

View file

@ -1,6 +1,6 @@
- name: Run docker compose up - name: Run docker compose up
ansible.builtin.shell: ansible.builtin.shell:
cmd: docker compose up -d cmd: docker compose up -d -e "{{ env_file }}"
chdir: {{ path }} chdir: {{ path }}
register: run_info register: run_info
changed_when: run_info.rc != 0 changed_when: run_info.rc != 0