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
hosts: fields
hosts: "{{ hosts }}"
gather_facts: False
roles:
- { role: ../roles/images }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,5 @@
- name: check utilization of slave nodes
hosts: fields
hosts: "{{ hosts }}"
gather_facts: False
roles:
- { 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
hosts: fields
hosts: "{{ hosts }}"
gather_facts: False
vars:
image: "{{ image }}"

View file

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

View file

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

View file

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