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
|
- name: check images on slave nodes
|
||||||
hosts: fields
|
hosts: "{{ hosts }}"
|
||||||
gather_facts: False
|
gather_facts: False
|
||||||
roles:
|
roles:
|
||||||
- { role: ../roles/images }
|
- { role: ../roles/images }
|
||||||
|
|
|
||||||
|
|
@ -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 }
|
||||||
|
|
|
||||||
|
|
@ -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 }
|
||||||
|
|
|
||||||
|
|
@ -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 }
|
||||||
|
|
|
||||||
|
|
@ -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 }
|
||||||
|
|
|
||||||
|
|
@ -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 }
|
||||||
|
|
|
||||||
|
|
@ -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 }}"
|
||||||
|
|
|
||||||
|
|
@ -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 }
|
||||||
|
|
|
||||||
|
|
@ -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
|
- name: pull image on slave nodes
|
||||||
hosts: fields
|
hosts: "{{ hosts }}"
|
||||||
gather_facts: False
|
gather_facts: False
|
||||||
vars:
|
vars:
|
||||||
image: "{{ image }}"
|
image: "{{ image }}"
|
||||||
|
|
|
||||||
|
|
@ -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 }
|
||||||
|
|
|
||||||
|
|
@ -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 }}"
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue