25 lines
657 B
YAML
25 lines
657 B
YAML
---
|
|
- name: Loading Docker Swarm configuration
|
|
shell: >
|
|
docker node ls | grep "Ready" | wc -l
|
|
register: nodecount
|
|
become: true
|
|
|
|
- set_fact:
|
|
deploy_on: "{{ 'manager' if (nodecount.stdout == '1') else 'worker' }}"
|
|
|
|
- name: Getting the list of Docker secrets
|
|
shell: docker secret ls | tail -n +2 | awk '{print $2}'
|
|
register: docker_secrets
|
|
become: true
|
|
|
|
- name: Reconfiguring files
|
|
ansible.builtin.template:
|
|
src: "{{ onelab_path }}/installation/latest/app/{{ item }}"
|
|
dest: "{{ onelab_path }}/{{ item }}"
|
|
with_items:
|
|
- 'docker-compose.yml'
|
|
- 'nginx/onelab.conf'
|
|
- 'proxy/proxy.conf'
|
|
- 'proxy/docker-compose.yml'
|