fix: prefix custom manifests with custom- and bump prom operator crd versions
Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
6 files changed
+40
-39
No files matched your search
@@ -10,18 +10,6 @@
|
||||
ansible.builtin.pause:
|
||||
seconds: 5
|
||||
tasks:
|
||||
- name: Check if cluster is installed
|
||||
check_mode: false
|
||||
ansible.builtin.stat:
|
||||
path: "/etc/rancher/k3s/config.yaml"
|
||||
register: k3s_check_installed
|
||||
|
||||
- name: Set manifest facts
|
||||
ansible.builtin.set_fact:
|
||||
k3s_server_manifests_templates: []
|
||||
k3s_server_manifests_urls: []
|
||||
when: k3s_check_installed.stat.exists
|
||||
|
||||
- name: Install Kubernetes
|
||||
ansible.builtin.include_role:
|
||||
name: xanmanning.k3s
|
||||
@@ -92,19 +80,20 @@
|
||||
name: servicemonitors.monitoring.coreos.com
|
||||
- kind: CustomResourceDefinition
|
||||
name: thanosrulers.monitoring.coreos.com
|
||||
- kind: CustomResourceDefinition
|
||||
name: scrapeconfigs.monitoring.coreos.com
|
||||
- kind: CustomResourceDefinition
|
||||
name: prometheusagents.monitoring.coreos.com
|
||||
when:
|
||||
- k3s_server_manifests_templates | length > 0
|
||||
or k3s_server_manifests_urls | length > 0
|
||||
- k3s_control_node is defined
|
||||
- k3s_control_node
|
||||
|
||||
# Cleaning up the manifests from the /var/lib/rancher/k3s/server/manifests
|
||||
# directory is needed because k3s has an awesome "feature" to always deploy
|
||||
# these on restarting the k3s systemd service. Removing them does NOT
|
||||
# uninstall the manifests.
|
||||
|
||||
# Removing them means we can manage the lifecycle of these components
|
||||
# outside of the /var/lib/rancher/k3s/server/manifests directory
|
||||
# NOTE
|
||||
# Cleaning up the manifests from the /var/lib/rancher/k3s/server/manifests directory
|
||||
# is needed because k3s has an awesome "feature" to always re-deploy them when the k3s
|
||||
# service is restarted. Removing them does not uninstall the manifests from your cluster.
|
||||
|
||||
- name: Remove deployed manifest templates
|
||||
ansible.builtin.file:
|
||||
|
||||
@@ -28,12 +28,14 @@
|
||||
public: true
|
||||
vars:
|
||||
k3s_state: uninstalled
|
||||
|
||||
- name: Gather list of CNI files
|
||||
ansible.builtin.find:
|
||||
paths: /etc/cni/net.d
|
||||
patterns: "*"
|
||||
hidden: true
|
||||
register: directory_contents
|
||||
|
||||
- name: Delete CNI files
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
- name: Locale | Set timezone
|
||||
community.general.timezone:
|
||||
name: "{{ timezone | default('Etc/UTC') }}"
|
||||
|
||||
- name: Networking
|
||||
block:
|
||||
- name: Networking | Set hostname to inventory hostname
|
||||
@@ -25,6 +26,7 @@
|
||||
path: /etc/hosts
|
||||
block: |
|
||||
127.0.1.1 {{ inventory_hostname }}
|
||||
|
||||
- name: Packages | Fedora
|
||||
block:
|
||||
- name: Packages | Install required packages
|
||||
@@ -36,6 +38,7 @@
|
||||
ansible.builtin.dnf:
|
||||
autoremove: true
|
||||
when: ansible_facts['distribution'] == 'Fedora'
|
||||
|
||||
- name: Packages | Ubuntu
|
||||
block:
|
||||
- name: Packages | Install required packages
|
||||
@@ -53,6 +56,7 @@
|
||||
notify: Reboot
|
||||
when: "'raspi' in ansible_kernel"
|
||||
when: ansible_facts['distribution'] == 'Ubuntu'
|
||||
|
||||
- name: User Configuration
|
||||
block:
|
||||
- name: User Configuration | Add additional SSH public keys
|
||||
@@ -60,6 +64,7 @@
|
||||
user: "{{ ansible_user }}"
|
||||
key: "{{ item }}"
|
||||
loop: "{{ public_ssh_keys | default([]) }}"
|
||||
|
||||
- name: System Configuration (1)
|
||||
block:
|
||||
- name: System Configuration (1) | Disable firewalld | Fedora
|
||||
@@ -80,6 +85,7 @@
|
||||
ansible.builtin.systemd:
|
||||
service: fstrim.timer
|
||||
enabled: true
|
||||
|
||||
- name: System Configuration (2)
|
||||
block:
|
||||
- name: System Configuration (2) | Enable kernel modules now
|
||||
|
||||
File renamed without changes.
Reference in new issue
Block a user