feat: a lots of stuff and bugfixes mostly
This commit is contained in:
parent
0289360eb6
commit
a13235a7db
14 changed files with 468 additions and 62 deletions
|
|
@ -1,39 +1,66 @@
|
|||
|
||||
- name: Create cuyper directory
|
||||
---
|
||||
- name: "Create cuyper {{ cuyper__cuyper_instance_path }}"
|
||||
ansible.builtin.file:
|
||||
path: "{{ cuyper__cuyper_instance_path }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Clone cuyper-hook repository
|
||||
- name: "Create cuyper storage path {{ cuyper__cuyper_storage_path }}"
|
||||
ansible.builtin.file:
|
||||
path: "{{ cuyper__cuyper_storage_path }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: "Create cuyper config path {{ cuyper__cuyper_config_path }}"
|
||||
ansible.builtin.file:
|
||||
path: "{{ cuyper__cuyper_config_path }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: "Create cuyper config path {{ cuyper__cuyper_config_path }}/nginx"
|
||||
ansible.builtin.file:
|
||||
path: "{{ cuyper__cuyper_config_path }}/nginx"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: "Clone {{ cuyper__repo }} repository {{ cuyper__cuyper_instance_path }}/cuyper-hook/"
|
||||
ansible.builtin.git:
|
||||
repo: ssh://git@git.nsnm.net:222/nsnm/cupyer-hook.git
|
||||
repo: "{{ cuyper__repo }}"
|
||||
dest: "{{ cuyper__cuyper_instance_path }}/cuyper-hook/"
|
||||
version: main
|
||||
update: yes
|
||||
|
||||
- name: create env on cuyper-hook
|
||||
- name: "create env on {{ cuyper__cuyper_instance_path }}/.env"
|
||||
ansible.builtin.template:
|
||||
src: templates/env.cuyper-hook.j2
|
||||
dest: "{{ cuyper__cuyper_instance_path }}/.env"
|
||||
|
||||
- name: create nginx hook file on loadbalancer
|
||||
- name: "create config {{ cuyper__cuyper_config_path }}/config.yml"
|
||||
ansible.builtin.template:
|
||||
src: templates/config.cupyer-hook.j2
|
||||
dest: "{{ cuyper__cuyper_config_file }}"
|
||||
src: templates/config.cuyper-hook.j2
|
||||
dest: "{{ cuyper__cuyper_config_path }}/config.yml"
|
||||
|
||||
- name: Touch vhosts
|
||||
- name: "Touch vhosts {{ cuyper__cuyper_config_path }}/vhosts.yml"
|
||||
ansible.builtin.file:
|
||||
path: "{{ cuyper__cuyper_vhosts_file }}"
|
||||
path: "{{ cuyper__cuyper_config_path }}/vhosts.yml"
|
||||
state: touch
|
||||
|
||||
- name: Copy docker-compose.yml
|
||||
ansible.builtin.copy:
|
||||
src: templates/docker-compose.cupyer-hook.j2
|
||||
dest: "{{ cuyper__cuyper_instance_path }}docker-compose.yml"
|
||||
- name: "create docker-compose.yml on {{ cuyper__cuyper_instance_path }}/docker-compose.yml"
|
||||
ansible.builtin.template:
|
||||
src: templates/docker-compose.cuyper-hook.j2
|
||||
dest: "{{ cuyper__cuyper_instance_path }}/docker-compose.yml"
|
||||
mode: '0644'
|
||||
|
||||
- name: Start cuyper service
|
||||
- name: "Create portainer storage path on {{ cuyper__portainer_storage_path }}"
|
||||
ansible.builtin.file:
|
||||
path: "{{ cuyper__portainer_storage_path }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: "docker compose restarted cuyper/portainer/loadbalancer on {{ cuyper__cuyper_instance_path }}"
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ cuyper__cuyper_instance_path }}"
|
||||
state: present
|
||||
state: present
|
||||
build: always
|
||||
recreate: always
|
||||
Loading…
Add table
Add a link
Reference in a new issue