---
# Copyright kubeinit contributors
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
- name: Add the Podman Ubuntu package repository to Apt
ansible.builtin.shell: |
set -eo pipefail
version_id=$(sed -n -e 's/^VERSION_ID="\(.*\)"/\1/p' /etc/os-release)
echo "deb https://download.opensuse.org/repositories/home:/kubeinit/xUbuntu_${version_id}/ /" > /etc/apt/sources.list.d/kubeinit.list
curl -L "https://download.opensuse.org/repositories/home:/kubeinit/xUbuntu_${version_id}/Release.key" | apt-key add -
apt-get update
args:
executable: /bin/bash
register: _result
changed_when: "_result.rc == 0"
- name: Prepare podman
ansible.builtin.include_role:
name: kubeinit.kubeinit.kubeinit_prepare
tasks_from: prepare_podman.yml
public: true
- name: Install common requirements
ansible.builtin.package:
name: "{{ kubeinit_cdk_common_dependencies }}"
state: present
when: kubeinit_cdk_common_dependencies is defined
- name: Install kubectl
ansible.builtin.package:
name: "kubectl"
state: present