34 lines
1.0 KiB
YAML
34 lines
1.0 KiB
YAML
---
|
|
# - name: Install Dokploy prerequisites
|
|
# ansible.builtin.apt:
|
|
# name: "{{ dokploy_prerequisites }}"
|
|
# state: present
|
|
# update_cache: true
|
|
|
|
- name: Download Dokploy installer
|
|
ansible.builtin.get_url:
|
|
url: "{{ dokploy_installer_url }}"
|
|
dest: "{{ dokploy_installer_path }}"
|
|
mode: "0755"
|
|
|
|
# The upstream installer is not idempotent & exits non-zero if the swarm is already initialized. Guard on the presence of the dokploy swarm service
|
|
- name: Check if Dokploy is already installed
|
|
ansible.builtin.command: docker service inspect dokploy
|
|
register: dokploy_installed
|
|
changed_when: false
|
|
failed_when: false
|
|
|
|
- name: Install Dokploy
|
|
ansible.builtin.command: "{{ dokploy_installer_path }}"
|
|
environment:
|
|
DOKPLOY_VERSION: "{{ dokploy_version }}"
|
|
changed_when: true
|
|
when: dokploy_installed.rc != 0
|
|
|
|
# - name: Update Dokploy (opt-in)
|
|
# ansible.builtin.command: "{{ dokploy_installer_path }} update"
|
|
# environment:
|
|
# DOKPLOY_VERSION: "{{ dokploy_version }}"
|
|
# changed_when: true
|
|
# when: dokploy_installed.rc == 0
|