Merge "Add support for deploying mcapi control plane k8s on debian-12"
This commit is contained in:
commit
0fc47826b0
@ -1,8 +1,8 @@
|
|||||||
collections:
|
collections:
|
||||||
- name: vexxhost.kubernetes
|
- name: vexxhost.kubernetes
|
||||||
source: https://github.com/vexxhost/ansible-collection-kubernetes
|
source: https://github.com/jrosser/ansible-collection-kubernetes
|
||||||
type: git
|
type: git
|
||||||
version: v1.14.1
|
version: venv-support
|
||||||
- name: osa_ops.mcapi_vexxhost
|
- name: osa_ops.mcapi_vexxhost
|
||||||
type: git
|
type: git
|
||||||
version: master
|
version: master
|
||||||
|
@ -14,3 +14,6 @@ openstack_host_nf_conntrack_max: 1572864
|
|||||||
|
|
||||||
# OSA containers dont run ssh by default so cannot use synchronize
|
# OSA containers dont run ssh by default so cannot use synchronize
|
||||||
upload_helm_chart_method: copy
|
upload_helm_chart_method: copy
|
||||||
|
|
||||||
|
# Run ansible modules in a venv on the target hosts
|
||||||
|
ansible_collection_kubernetes_target_venv: /opt/mcapi_ansible_venv
|
||||||
|
@ -13,11 +13,12 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Gather k8s facts
|
- name: Initial facts gathering and venv setup
|
||||||
hosts: k8s_all
|
hosts: k8s_all
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
- k8s-venv
|
||||||
tasks:
|
tasks:
|
||||||
- name: Gather minimal facts for k8s
|
- name: Gather minimal facts for k8s
|
||||||
setup:
|
setup:
|
||||||
@ -26,6 +27,22 @@
|
|||||||
- min
|
- min
|
||||||
when: osa_gather_facts | default(True)
|
when: osa_gather_facts | default(True)
|
||||||
|
|
||||||
|
- name: ensure python3 virtualenv is present
|
||||||
|
ansible.builtin.package:
|
||||||
|
name:
|
||||||
|
- python3-venv
|
||||||
|
- python3-setuptools
|
||||||
|
when: ansible_facts['os_family'] == 'Debian'
|
||||||
|
|
||||||
|
- name: ensure ansible target venv is present
|
||||||
|
ansible.builtin.pip:
|
||||||
|
name:
|
||||||
|
- packaging
|
||||||
|
virtualenv_command: "python3 -m venv"
|
||||||
|
virtualenv: "{{ ansible_collection_kubernetes_target_venv }}"
|
||||||
|
when: ansible_collection_kubernetes_target_venv is defined
|
||||||
|
|
||||||
|
|
||||||
- name: Create and configure k8s container
|
- name: Create and configure k8s container
|
||||||
hosts: k8s_all
|
hosts: k8s_all
|
||||||
serial: "{{ k8s_serial | default('20%') }}"
|
serial: "{{ k8s_serial | default('20%') }}"
|
||||||
@ -104,6 +121,7 @@
|
|||||||
vars:
|
vars:
|
||||||
k8s_node_labels:
|
k8s_node_labels:
|
||||||
openstack-control-plane: enabled
|
openstack-control-plane: enabled
|
||||||
|
ansible_python_interpreter: "{{ ansible_collection_kubernetes_target_venv ~ '/bin/python' }}"
|
||||||
roles:
|
roles:
|
||||||
- role: "vexxhost.containers.containerd"
|
- role: "vexxhost.containers.containerd"
|
||||||
- role: "vexxhost.kubernetes.kubernetes"
|
- role: "vexxhost.kubernetes.kubernetes"
|
||||||
@ -126,6 +144,8 @@
|
|||||||
hosts: k8s_all
|
hosts: k8s_all
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
user: root
|
user: root
|
||||||
|
vars:
|
||||||
|
ansible_python_interpreter: "{{ ansible_collection_kubernetes_target_venv ~ '/bin/python' }}"
|
||||||
roles:
|
roles:
|
||||||
- role: "vexxhost.kubernetes.cert_manager"
|
- role: "vexxhost.kubernetes.cert_manager"
|
||||||
- role: "vexxhost.kubernetes.cluster_api"
|
- role: "vexxhost.kubernetes.cluster_api"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user