blob: 056dd2ec32837047dd26bd302ab134a1adad0f2b [file] [log] [blame]
Mohammed Naser336caf42022-03-11 17:56:45 -05001# Copyright (c) 2022 VEXXHOST, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
Mohammed Naser8eafb7e2023-02-08 18:46:34 +000015- hosts: "{{ target | default('all') }}"
Mohammed Naser336caf42022-03-11 17:56:45 -050016 become: true
17 roles:
Tadas Sutkaitisc4f0ded2023-03-29 18:51:19 +030018 - role: defaults
ricolin2f1cfea2022-11-26 03:35:56 +080019 - role: sysctl
Mohammed Naser64f84a42022-09-01 16:59:30 -040020 - role: ethtool
21 tags:
22 - ethtool
Tadas Sutkaitisc4f0ded2023-03-29 18:51:19 +030023 post_tasks:
24 - name: Set a fact with the "atmosphere_images" for other plays
25 ansible.builtin.set_fact:
26 atmosphere_images: "{{ atmosphere_images }}"
27
28- import_playbook: vexxhost.kubernetes.site
29 vars:
30 keepalived_image: "{{ atmosphere_images['keepalived'] }}"
31 keepalived_vrid: "{{ kubernetes_keepalived_vrid }}"
32 keepalived_interface: "{{ kubernetes_keepalived_interface }}"
33 keepalived_vip: "{{ kubernetes_keepalived_vip }}"
34 haproxy_image: "{{ atmosphere_images['haproxy'] }}"
35 containerd_pause_image: "{{ atmosphere_images['pause'] }}"
36 kubernetes_image_repository: "{{ atmosphere_images['kube_apiserver'] | vexxhost.kubernetes.docker_image('prefix') }}"
37 cilium_node_image: "{{ atmosphere_images['cilium_node'] }}"
38 cilium_operator_image: "{{ atmosphere_images['cilium_operator'] }}"
Tadas Sutkaitisc4f0ded2023-03-29 18:51:19 +030039
40- hosts: "{{ target | default('all') }}"
41 become: true
42 roles:
43 - role: vexxhost.atmosphere.kubernetes_node_labels
44 tags:
45 - kubernetes-node-labels
Oleksandr Kozachenkodcf6a8b2023-03-09 12:06:12 +010046
47# NOTE(mnaser): Add task to uninstall "unattended-upgrades" to avoid system
48# upgrades during the deployment
49- hosts: all
50 become: true
51 gather_facts: false
52 tasks:
53 - name: Uninstall unattended-upgrades
54 ansible.builtin.apt:
55 name: unattended-upgrades
56 state: absent