diff --git a/ansible/env/vars.yml b/ansible/env/vars.yml index e69de29..5a76efa 100644 --- a/ansible/env/vars.yml +++ b/ansible/env/vars.yml @@ -0,0 +1 @@ +# for docker swarm token \ No newline at end of file diff --git a/ansible/playbooks/check_images.yml b/ansible/playbooks/check_images.yml index 34f8a31..22a1e5e 100644 --- a/ansible/playbooks/check_images.yml +++ b/ansible/playbooks/check_images.yml @@ -1,5 +1,5 @@ - name: check images on slave nodes - hosts: fields + hosts: "{{ hosts }}" gather_facts: False roles: - { role: ../roles/images } diff --git a/ansible/playbooks/check_internet_slaves.yml b/ansible/playbooks/check_internet_slaves.yml index 5741c7b..7986fa7 100644 --- a/ansible/playbooks/check_internet_slaves.yml +++ b/ansible/playbooks/check_internet_slaves.yml @@ -1,5 +1,5 @@ - name: check internet on slave nodes - hosts: fields + hosts: "{{ hosts }}" gather_facts: False roles: - { role: ../roles/internet } diff --git a/ansible/playbooks/check_memory.yml b/ansible/playbooks/check_memory.yml index 8c1eed1..d1fb6c3 100644 --- a/ansible/playbooks/check_memory.yml +++ b/ansible/playbooks/check_memory.yml @@ -1,5 +1,5 @@ - name: check ROM memory on slave nodes - hosts: fields + hosts: "{{ hosts }}" gather_facts: False roles: - { role: ../roles/memory } diff --git a/ansible/playbooks/check_module.yml b/ansible/playbooks/check_module.yml index 935640e..096da12 100644 --- a/ansible/playbooks/check_module.yml +++ b/ansible/playbooks/check_module.yml @@ -1,5 +1,5 @@ - name: check modules running on slave nodes - hosts: fields + hosts: "{{ hosts }}" gather_facts: False roles: - { role: ../roles/check } diff --git a/ansible/playbooks/config_cluster.yml b/ansible/playbooks/config_cluster.yml index 89af95c..b6c4aa8 100644 --- a/ansible/playbooks/config_cluster.yml +++ b/ansible/playbooks/config_cluster.yml @@ -1,5 +1,5 @@ - name: check docker engine - hosts: fields + hosts: "{{ hosts }}" gather_facts: False roles: - { role: ../roles/docker } diff --git a/ansible/playbooks/delete_images.yml b/ansible/playbooks/delete_images.yml index cb9e857..6ab091e 100644 --- a/ansible/playbooks/delete_images.yml +++ b/ansible/playbooks/delete_images.yml @@ -1,5 +1,5 @@ - name: delete images on slave nodes - hosts: fields + hosts: "{{ hosts }}" gather_facts: False roles: - { role: ../roles/delete } diff --git a/ansible/playbooks/login_slaves.yml b/ansible/playbooks/login_slaves.yml index 37c4091..1cd7855 100644 --- a/ansible/playbooks/login_slaves.yml +++ b/ansible/playbooks/login_slaves.yml @@ -1,5 +1,5 @@ - name: login on slave nodes - hosts: fields + hosts: "{{ hosts }}" gather_facts: False vars: token: "{{ token }}" diff --git a/ansible/playbooks/more_check.yml b/ansible/playbooks/more_check.yml index 1b4d8dd..7d15832 100644 --- a/ansible/playbooks/more_check.yml +++ b/ansible/playbooks/more_check.yml @@ -1,5 +1,5 @@ - name: check utilization of slave nodes - hosts: fields + hosts: "{{ hosts }}" gather_facts: False roles: - { role: ../roles/more_check } diff --git a/ansible/playbooks/ping_slaves.yml b/ansible/playbooks/ping_slaves.yml deleted file mode 100644 index de2f12e..0000000 --- a/ansible/playbooks/ping_slaves.yml +++ /dev/null @@ -1,5 +0,0 @@ -- name: ping slave nodes - hosts: fields - gather_facts: False - roles: - - { role: ../roles/ping } diff --git a/ansible/playbooks/pull_image.yml b/ansible/playbooks/pull_image.yml index 0422fb9..3039417 100644 --- a/ansible/playbooks/pull_image.yml +++ b/ansible/playbooks/pull_image.yml @@ -1,5 +1,5 @@ - name: pull image on slave nodes - hosts: fields + hosts: "{{ hosts }}" gather_facts: False vars: image: "{{ image }}" diff --git a/ansible/playbooks/run_module.yml b/ansible/playbooks/run_module.yml index a498379..e0c1e40 100644 --- a/ansible/playbooks/run_module.yml +++ b/ansible/playbooks/run_module.yml @@ -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 } diff --git a/ansible/playbooks/stop_module.yml b/ansible/playbooks/stop_module.yml index 00b69d6..6035bc3 100644 --- a/ansible/playbooks/stop_module.yml +++ b/ansible/playbooks/stop_module.yml @@ -1,5 +1,5 @@ - name: stop module on slave node - hosts: fields + hosts: "{{ hosts }}" gather_facts: False vars: module_port: "{{ module_port }}" diff --git a/ansible/roles/run/tasks/main.yml b/ansible/roles/run/tasks/main.yml index 02d3c6f..7505ea7 100644 --- a/ansible/roles/run/tasks/main.yml +++ b/ansible/roles/run/tasks/main.yml @@ -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