From e6d3c43de23ce1d55c0bc4c4f70541319f690554 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Mon, 2 Sep 2024 23:24:18 +0200 Subject: [PATCH] Add yaook-operators play & role Signed-off-by: Christian Berendt --- playbooks/kubernetes-k8s-yaook-operators.yml | 11 ++++++++++ roles/yaook_operators/README.md | 0 roles/yaook_operators/defaults/main.yml | 10 ++++++++++ roles/yaook_operators/meta/main.yml | 21 ++++++++++++++++++++ roles/yaook_operators/tasks/main.yml | 20 +++++++++++++++++++ roles/yaook_operators/vars/main.yml | 3 +++ 6 files changed, 65 insertions(+) create mode 100644 playbooks/kubernetes-k8s-yaook-operators.yml create mode 100644 roles/yaook_operators/README.md create mode 100644 roles/yaook_operators/defaults/main.yml create mode 100644 roles/yaook_operators/meta/main.yml create mode 100644 roles/yaook_operators/tasks/main.yml create mode 100644 roles/yaook_operators/vars/main.yml diff --git a/playbooks/kubernetes-k8s-yaook-operators.yml b/playbooks/kubernetes-k8s-yaook-operators.yml new file mode 100644 index 0000000..4d31eb7 --- /dev/null +++ b/playbooks/kubernetes-k8s-yaook-operators.yml @@ -0,0 +1,11 @@ +--- +- name: Apply role yaook_operators + hosts: + - "{{ hosts_manager|default(groups['manager'][0])|default('localhost') }}" + connection: local + gather_facts: false + + tasks: + - name: Include yaook_operators role + ansible.builtin.include_role: + name: yaook_operators diff --git a/roles/yaook_operators/README.md b/roles/yaook_operators/README.md new file mode 100644 index 0000000..e69de29 diff --git a/roles/yaook_operators/defaults/main.yml b/roles/yaook_operators/defaults/main.yml new file mode 100644 index 0000000..2505181 --- /dev/null +++ b/roles/yaook_operators/defaults/main.yml @@ -0,0 +1,10 @@ +--- +yaook_operators_helm_release_namespace: yaook-operators + +yaook_operators_keystone_helm_release_name: yaook-keystone-operator +yaook_operators_keystone_helm_chart_ref: /charts/keystone-operator +yaook_operators_keystone_helm_values: {} + +yaook_operators_keystone_resources_helm_release_name: yaook-keystone-resources-operator +yaook_operators_keystone_resources_helm_chart_ref: /charts/keystone-resources-operator +yaook_operators_keystone_resources_helm_values: {} diff --git a/roles/yaook_operators/meta/main.yml b/roles/yaook_operators/meta/main.yml new file mode 100644 index 0000000..cfd1333 --- /dev/null +++ b/roles/yaook_operators/meta/main.yml @@ -0,0 +1,21 @@ +--- +galaxy_info: + author: Christian Berendt + description: Role osism.kubernetes.yaook_operators + license: Apache License 2.0 + min_ansible_version: 2.16.0 + platforms: + - name: Ubuntu + versions: + - jammy + - noble + - name: Debian + versions: + - bookworm + - name: EL + versions: + - "9" + galaxy_tags: + - helm + - kubernetes + - osism diff --git a/roles/yaook_operators/tasks/main.yml b/roles/yaook_operators/tasks/main.yml new file mode 100644 index 0000000..0b211be --- /dev/null +++ b/roles/yaook_operators/tasks/main.yml @@ -0,0 +1,20 @@ +--- +- name: Deploy keystone-operator helm chart + kubernetes.core.helm: + release_name: "{{ yaook_operators_keystone_helm_release_name }}" + chart_ref: "{{ yaook_operators_keystone_helm_chart_ref }}" + release_namespace: "{{ yaook_operators_helm_release_namespace }}" + create_namespace: true + kubeconfig: /share/kubeconfig + wait: true + values: "{{ _yaook_operators_keystone_helm_values | combine(yaook_operators_keystone_helm_values, recursive=True) }}" + +- name: Deploy keystone-resources-operator helm chart + kubernetes.core.helm: + release_name: "{{ yaook_operators_keystone_resources_helm_release_name }}" + chart_ref: "{{ yaook_operators_keystone_resources_helm_chart_ref }}" + release_namespace: "{{ yaook_operators_helm_release_namespace }}" + create_namespace: true + kubeconfig: /share/kubeconfig + wait: true + values: "{{ _yaook_operators_keystone_resources_helm_values | combine(yaook_operators_keystone_resources_helm_values, recursive=True) }}" diff --git a/roles/yaook_operators/vars/main.yml b/roles/yaook_operators/vars/main.yml new file mode 100644 index 0000000..ceef56e --- /dev/null +++ b/roles/yaook_operators/vars/main.yml @@ -0,0 +1,3 @@ +--- +_yaook_operators_keystone_helm_values: {} +_yaook_operators_keystone_resources_helm_values: {}