mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2026-03-13 05:42:46 +01:00
build
This commit is contained in:
@@ -54,16 +54,32 @@
|
||||
- software-properties-common
|
||||
state: present
|
||||
|
||||
- name: Add Docker GPG key for containerd
|
||||
ansible.builtin.apt_key:
|
||||
url: https://download.docker.com/linux/ubuntu/gpg
|
||||
keyring: /etc/apt/trusted.gpg.d/containerd.gpg
|
||||
state: present
|
||||
- name: Remove old Docker repository files (if any)
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
loop:
|
||||
- /etc/apt/sources.list.d/docker.list
|
||||
- /etc/apt/keyrings/docker.gpg
|
||||
- /etc/apt/trusted.gpg.d/containerd.gpg
|
||||
|
||||
- name: Add Docker repository
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename }} stable"
|
||||
- name: Create keyrings directory
|
||||
file:
|
||||
path: /etc/apt/keyrings
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Download Docker GPG key
|
||||
get_url:
|
||||
url: https://download.docker.com/linux/ubuntu/gpg
|
||||
dest: /etc/apt/keyrings/docker.gpg
|
||||
mode: '0644'
|
||||
|
||||
- name: Add Docker repository (Ubuntu 24.04 safe)
|
||||
apt_repository:
|
||||
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename }} stable"
|
||||
state: present
|
||||
filename: docker
|
||||
|
||||
|
||||
- name: Install required packages
|
||||
@@ -118,7 +134,7 @@
|
||||
- kubectl
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
||||
|
||||
register: k8s_install
|
||||
retries: 5
|
||||
delay: 10
|
||||
|
||||
Reference in New Issue
Block a user