feat: add coolify installation role
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
coolify_installer_url: "https://cdn.coollabs.io/coolify/install.sh"
|
||||||
|
coolify_installer_dest: "/tmp/coolify-install.sh"
|
||||||
|
coolify_data_dir: "/data/coolify"
|
||||||
|
coolify_compose_file: "{{ coolify_data_dir }}/source/docker-compose.yml"
|
||||||
|
|
||||||
|
## Pin to a release (e.g. "v4.0.0") or leave empty for latest.
|
||||||
|
coolify_version: ""
|
||||||
|
|
||||||
|
## Coolify self-updates by default; set false to manage upgrades yourself.
|
||||||
|
coolify_autoupdate: true
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
- name: Check if Coolify is already installed
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: "{{ coolify_compose_file }}"
|
||||||
|
register: coolify_installed
|
||||||
|
|
||||||
|
- name: Download Coolify installer
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: "{{ coolify_installer_url }}"
|
||||||
|
dest: "{{ coolify_installer_dest }}"
|
||||||
|
mode: "0755"
|
||||||
|
when: not coolify_installed.stat.exists
|
||||||
|
|
||||||
|
- name: Run Coolify installer
|
||||||
|
become: true
|
||||||
|
ansible.builtin.command:
|
||||||
|
argv:
|
||||||
|
- "{{ coolify_installer_dest }}"
|
||||||
|
- "{{ coolify_version }}"
|
||||||
|
environment:
|
||||||
|
AUTOUPDATE: "{{ coolify_autoupdate | bool | ternary('true', 'false') }}"
|
||||||
|
when: not coolify_installed.stat.exists
|
||||||
|
changed_when: true
|
||||||
|
async: 1800
|
||||||
|
poll: 15
|
||||||
Reference in New Issue
Block a user