prole/infrastructure/playbooks/k3s_mariadb_datastore_rollout.yml
chrisfu a43aed7134 k3s: eliminate localhost registry + dedupe common-core
- Ensure k3s mode uses the k3s registry endpoint and avoid localhost/k3d image prefixes.

- Make ArgoCD repo-server cmp symlink creation idempotent.

- Normalize common-core provisioning to knoe-system and add repair-time dedupe of stray default-namespace installs.

- Add k3s MariaDB datastore/refresh playbooks and regression tests.
2026-03-05 14:31:33 -08:00

55 lines
1.8 KiB
YAML

---
- name: Roll out k3s config for external MariaDB datastore (servers)
hosts: k3s_hosts
gather_facts: false
become: true
serial: 1
pre_tasks:
- name: Require explicit acknowledgement (this changes the k3s datastore)
ansible.builtin.assert:
that:
- k3s_datastore_migration_ack | default(false) | bool
fail_msg: >-
Refusing to proceed without k3s_datastore_migration_ack=true.
Switching k3s datastore backends may require a rebuild/migration plan.
- name: Only run on k3s server nodes
ansible.builtin.meta: end_host
when: k3s_role | default('') != 'server'
- name: Require k3s_datastore_endpoint for MariaDB datastore
ansible.builtin.assert:
that:
- (k3s_datastore_endpoint | default('')) | length > 0
fail_msg: "k3s_datastore_endpoint is empty on {{ inventory_hostname }}"
tasks:
- name: Apply k3s install/config changes (server)
ansible.builtin.import_role:
name: k3s
tasks_from: install
- name: Roll out k3s config for external MariaDB datastore (agents)
hosts: k3s_hosts
gather_facts: false
become: true
serial: 1
pre_tasks:
- name: Require explicit acknowledgement (this changes the k3s datastore)
ansible.builtin.assert:
that:
- k3s_datastore_migration_ack | default(false) | bool
fail_msg: >-
Refusing to proceed without k3s_datastore_migration_ack=true.
Switching k3s datastore backends may require a rebuild/migration plan.
- name: Only run on k3s agent nodes
ansible.builtin.meta: end_host
when: k3s_role | default('') != 'agent'
tasks:
- name: Apply k3s install/config changes (agent)
ansible.builtin.import_role:
name: k3s
tasks_from: install