forked from jakub/ansible
Add Ansible playbook for updating Portainer Agent on VM via Proxmox
This commit is contained in:
@@ -20,7 +20,8 @@
|
||||
|
||||
# --- Kafka / Redpanda Console specifics ---
|
||||
kafka_project: "kafka"
|
||||
kafka_compose_file: "/data/compose/kafka/docker-compose.yml"
|
||||
# Adjusted to match your actual compose file location
|
||||
kafka_compose_file: "/data/compose/docker-compose.yml"
|
||||
|
||||
kafka_services:
|
||||
- broker3
|
||||
@@ -28,7 +29,7 @@
|
||||
|
||||
redpanda_console_port: 8084
|
||||
|
||||
# Controller-side URL (default to direct VM IP/port)
|
||||
# Controller-side URL (default to direct VM IP/port or external URL)
|
||||
redpanda_console_url: "{{ lookup('env', 'REDPANDA_CONSOLE_URL') | default('http://192.168.69.254:8084/overview', true) }}"
|
||||
|
||||
redpanda_retries: "{{ RETRIES }}"
|
||||
@@ -38,9 +39,14 @@
|
||||
docker_prefix: "unalias docker 2>/dev/null || true; DOCKER_CLI_HINTS=0; command docker"
|
||||
|
||||
# Commands to run on the target VM (quiet outputs)
|
||||
# Uses the compose stack for broker3 + kafka-ui
|
||||
# 1) Pull latest images for broker3 + kafka-ui
|
||||
# 2) Stop any running containers with these names (legacy or compose-managed)
|
||||
# 3) Remove any containers with these names to avoid name conflicts
|
||||
# 4) Recreate services via docker compose
|
||||
kafka_commands:
|
||||
- "{{ docker_prefix }} compose -p {{ kafka_project }} -f {{ kafka_compose_file }} pull {{ kafka_services | join(' ') }} >/dev/null"
|
||||
- "{{ docker_prefix }} stop {{ kafka_services | join(' ') }} >/dev/null 2>&1 || true"
|
||||
- "{{ docker_prefix }} rm -f {{ kafka_services | join(' ') }} >/dev/null 2>&1 || true"
|
||||
- "{{ docker_prefix }} compose -p {{ kafka_project }} -f {{ kafka_compose_file }} up -d --no-deps --force-recreate {{ kafka_services | join(' ') }} >/dev/null"
|
||||
|
||||
tasks:
|
||||
@@ -105,7 +111,7 @@
|
||||
url: "{{ redpanda_console_url }}"
|
||||
method: GET
|
||||
return_content: true
|
||||
validate_certs: false # plain HTTP on 192.168.69.254
|
||||
validate_certs: false # plain HTTP on 192.168.69.254 (or as configured)
|
||||
status_code: 200
|
||||
register: redpanda_controller
|
||||
delegate_to: localhost
|
||||
|
||||
Reference in New Issue
Block a user