fixed ansible playbooks
This commit is contained in:
parent
68d4976a97
commit
e26d4d72e5
14 changed files with 15 additions and 20 deletions
1
ansible/env/vars.yml
vendored
1
ansible/env/vars.yml
vendored
|
|
@ -0,0 +1 @@
|
|||
# for docker swarm token
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
- name: check images on slave nodes
|
||||
hosts: fields
|
||||
hosts: "{{ hosts }}"
|
||||
gather_facts: False
|
||||
roles:
|
||||
- { role: ../roles/images }
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
- name: check internet on slave nodes
|
||||
hosts: fields
|
||||
hosts: "{{ hosts }}"
|
||||
gather_facts: False
|
||||
roles:
|
||||
- { role: ../roles/internet }
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
- name: check ROM memory on slave nodes
|
||||
hosts: fields
|
||||
hosts: "{{ hosts }}"
|
||||
gather_facts: False
|
||||
roles:
|
||||
- { role: ../roles/memory }
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
- name: check modules running on slave nodes
|
||||
hosts: fields
|
||||
hosts: "{{ hosts }}"
|
||||
gather_facts: False
|
||||
roles:
|
||||
- { role: ../roles/check }
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
- name: check docker engine
|
||||
hosts: fields
|
||||
hosts: "{{ hosts }}"
|
||||
gather_facts: False
|
||||
roles:
|
||||
- { role: ../roles/docker }
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
- name: delete images on slave nodes
|
||||
hosts: fields
|
||||
hosts: "{{ hosts }}"
|
||||
gather_facts: False
|
||||
roles:
|
||||
- { role: ../roles/delete }
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
- name: login on slave nodes
|
||||
hosts: fields
|
||||
hosts: "{{ hosts }}"
|
||||
gather_facts: False
|
||||
vars:
|
||||
token: "{{ token }}"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
- name: check utilization of slave nodes
|
||||
hosts: fields
|
||||
hosts: "{{ hosts }}"
|
||||
gather_facts: False
|
||||
roles:
|
||||
- { role: ../roles/more_check }
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
- name: ping slave nodes
|
||||
hosts: fields
|
||||
gather_facts: False
|
||||
roles:
|
||||
- { role: ../roles/ping }
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
- name: pull image on slave nodes
|
||||
hosts: fields
|
||||
hosts: "{{ hosts }}"
|
||||
gather_facts: False
|
||||
vars:
|
||||
image: "{{ image }}"
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
- name: stop module on slave node
|
||||
hosts: fields
|
||||
hosts: "{{ hosts }}"
|
||||
gather_facts: False
|
||||
vars:
|
||||
module_port: "{{ module_port }}"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue