hw4: finalize selenoid and ansible workflow with citrus tests
This commit is contained in:
37
ansible/roles/ggr_gateway/tasks/main.yml
Normal file
37
ansible/roles/ggr_gateway/tasks/main.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
- name: Create GGR directory structure
|
||||
ansible.builtin.file:
|
||||
path: "{{ ggr_dir }}/{{ item }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
loop:
|
||||
- quota
|
||||
- nginx
|
||||
|
||||
- name: Render GGR quota file
|
||||
ansible.builtin.template:
|
||||
src: quota.xml.j2
|
||||
dest: "{{ ggr_dir }}/quota/{{ ggr_quota_name }}.xml"
|
||||
mode: "0644"
|
||||
|
||||
- name: Render nginx config
|
||||
ansible.builtin.template:
|
||||
src: nginx.conf.j2
|
||||
dest: "{{ ggr_dir }}/nginx/default.conf"
|
||||
mode: "0644"
|
||||
|
||||
- name: Render docker compose for GGR gateway
|
||||
ansible.builtin.template:
|
||||
src: docker-compose.ggr.yml.j2
|
||||
dest: "{{ ggr_dir }}/{{ ggr_compose_file }}"
|
||||
mode: "0644"
|
||||
|
||||
- name: Stop previous GGR gateway stack and remove orphans
|
||||
ansible.builtin.command:
|
||||
cmd: docker compose -f {{ ggr_compose_file }} down --remove-orphans
|
||||
chdir: "{{ ggr_dir }}"
|
||||
changed_when: false
|
||||
|
||||
- name: Start GGR gateway stack
|
||||
ansible.builtin.command:
|
||||
cmd: docker compose -f {{ ggr_compose_file }} up -d --force-recreate
|
||||
chdir: "{{ ggr_dir }}"
|
||||
Reference in New Issue
Block a user