Mohammed Naser | 336caf4 | 2022-03-11 17:56:45 -0500 | [diff] [blame] | 1 | # 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 Naser | 8eafb7e | 2023-02-08 18:46:34 +0000 | [diff] [blame] | 15 | - hosts: "{{ target | default('all') }}" |
Mohammed Naser | 336caf4 | 2022-03-11 17:56:45 -0500 | [diff] [blame] | 16 | become: true |
| 17 | roles: |
Tadas Sutkaitis | c4f0ded | 2023-03-29 18:51:19 +0300 | [diff] [blame] | 18 | - role: defaults |
ricolin | 2f1cfea | 2022-11-26 03:35:56 +0800 | [diff] [blame] | 19 | - role: sysctl |
Mohammed Naser | 545bc43 | 2023-04-16 23:02:23 +0000 | [diff] [blame] | 20 | tags: |
| 21 | - sysctl |
Mohammed Naser | 64f84a4 | 2022-09-01 16:59:30 -0400 | [diff] [blame] | 22 | - role: ethtool |
| 23 | tags: |
| 24 | - ethtool |
Tadas Sutkaitis | c4f0ded | 2023-03-29 18:51:19 +0300 | [diff] [blame] | 25 | post_tasks: |
| 26 | - name: Set a fact with the "atmosphere_images" for other plays |
| 27 | ansible.builtin.set_fact: |
| 28 | atmosphere_images: "{{ atmosphere_images }}" |
Mohammed Naser | 5c7bf2b | 2023-06-05 17:15:44 -0400 | [diff] [blame] | 29 | tags: |
| 30 | - always |
Tadas Sutkaitis | c4f0ded | 2023-03-29 18:51:19 +0300 | [diff] [blame] | 31 | |
| 32 | - import_playbook: vexxhost.kubernetes.site |
| 33 | vars: |
| 34 | keepalived_image: "{{ atmosphere_images['keepalived'] }}" |
| 35 | keepalived_vrid: "{{ kubernetes_keepalived_vrid }}" |
| 36 | keepalived_interface: "{{ kubernetes_keepalived_interface }}" |
| 37 | keepalived_vip: "{{ kubernetes_keepalived_vip }}" |
| 38 | haproxy_image: "{{ atmosphere_images['haproxy'] }}" |
| 39 | containerd_pause_image: "{{ atmosphere_images['pause'] }}" |
| 40 | kubernetes_image_repository: "{{ atmosphere_images['kube_apiserver'] | vexxhost.kubernetes.docker_image('prefix') }}" |
| 41 | cilium_node_image: "{{ atmosphere_images['cilium_node'] }}" |
| 42 | cilium_operator_image: "{{ atmosphere_images['cilium_operator'] }}" |
Tadas Sutkaitis | c4f0ded | 2023-03-29 18:51:19 +0300 | [diff] [blame] | 43 | |
| 44 | - hosts: "{{ target | default('all') }}" |
| 45 | become: true |
| 46 | roles: |
| 47 | - role: vexxhost.atmosphere.kubernetes_node_labels |
| 48 | tags: |
| 49 | - kubernetes-node-labels |
Oleksandr Kozachenko | dcf6a8b | 2023-03-09 12:06:12 +0100 | [diff] [blame] | 50 | |
| 51 | # NOTE(mnaser): Add task to uninstall "unattended-upgrades" to avoid system |
| 52 | # upgrades during the deployment |
Mohammed Naser | aa79027 | 2023-10-06 18:46:27 -0400 | [diff] [blame] | 53 | - hosts: "{{ target | default('all') }}" |
Oleksandr Kozachenko | dcf6a8b | 2023-03-09 12:06:12 +0100 | [diff] [blame] | 54 | become: true |
| 55 | gather_facts: false |
| 56 | tasks: |
| 57 | - name: Uninstall unattended-upgrades |
| 58 | ansible.builtin.apt: |
| 59 | name: unattended-upgrades |
| 60 | state: absent |