add roles/vhosts/HAProxy

This commit is contained in:
Haitao Pan 2025-12-23 16:24:54 +08:00
parent d47cd6ff5e
commit 9380042891
3 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,9 @@
- name: setup xcontrol dashboard
hosts: all
become: true
vars:
xcontrol_dashboard_active_color: blue
xcontrol_dashboard_blue_image: cloudneutral/dashboard
xcontrol_dashboard_green_image: cloudneutral/dashboard
roles:
- roles/docker/xcontrol-dashboard/

View File

@ -0,0 +1,15 @@
---
- name: Provision HAProxy HTTPS vhost
hosts: all
become: true
gather_facts: true
tasks:
- name: Install HAProxy and certbot
import_tasks: tasks/install.yml
- name: Issue and renew certificates
import_tasks: tasks/certbot.yml
- name: Configure HAProxy vhost
import_tasks: tasks/configure.yml

View File

@ -10,7 +10,12 @@
- name: Determine repository architecture
ansible.builtin.set_fact:
docker_repo_arch: "{{ 'amd64' if ansible_architecture == 'x86_64' else ansible_architecture }}"
docker_repo_arch: >-
{{
'amd64' if ansible_architecture == 'x86_64'
else 'arm64' if ansible_architecture in ['aarch64', 'arm64']
else ansible_architecture
}}
when: ansible_distribution == 'Ubuntu'
- name: Ensure platform is supported