Added new playbook `setup_metrics_server.yml` and standalone role `roles/metrics_server/` to centralize Kubernetes metrics server deployment and configuration, separating concerns from the main uyuni role for modularity and reuse.
10 lines
458 B
YAML
10 lines
458 B
YAML
---
|
|
- name: Manifest | Apply metrics-server
|
|
ansible.builtin.command: kubectl apply -f {{ role_path }}/files/metrics-server-manifest.yml
|
|
environment:
|
|
KUBECONFIG: "{{ metrics_server_kubeconfig }}"
|
|
PATH: "/usr/local/bin:/usr/bin:/bin"
|
|
register: _manifest_apply
|
|
changed_when: "'created' in _manifest_apply.stdout or 'configured' in _manifest_apply.stdout"
|
|
failed_when: _manifest_apply.rc != 0 and 'already exists' not in _manifest_apply.stderr
|