Skip to content

Commit

Permalink
delete redundant operation from containerd installation
Browse files Browse the repository at this point in the history
  • Loading branch information
logica0419 committed Dec 28, 2023
1 parent fdf504a commit 06eb602
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 28 deletions.
31 changes: 6 additions & 25 deletions ansible/roles/containerd/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
content: |
overlay
br_netfilter
dest: /etc/modules-load.d/containerd.conf
dest: /etc/modules-load.d/k8s.conf
mode: "0644"
with_items:
- "{{ users }}"
Expand All @@ -26,32 +26,13 @@
ignoreerrors: true
with_dict: "{{ containerd_sysctl_config }}"

- name: Install "apt-transport-https ca-certificates curl software-properties-common" packages
ansible.builtin.apt:
name: "{{ packages }}"
state: present
vars:
packages:
- apt-transport-https
- ca-certificates
- curl
- software-properties-common
- name: Add gpg key
ansible.builtin.apt_key:
url: https://download.docker.com/linux/debian/gpg

- name: Get docker's official GPG key
ansible.builtin.get_url:
url: https://download.docker.com/linux/ubuntu/gpg
dest: /tmp/docker.gpg
mode: "0644"
force: true

- name: Add docker's official GPG key
ansible.builtin.shell: gpg --dearmor --batch --yes -o /etc/apt/keyrings/docker.gpg < /tmp/docker.gpg
changed_when: false

- name: Add docker repository
- name: Add Docker apt repository
ansible.builtin.apt_repository:
repo: deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable
state: present
repo: deb https://download.docker.com/linux/ubuntu jammy stable

- name: Update apt repository
ansible.builtin.apt:
Expand Down
3 changes: 0 additions & 3 deletions ansible/roles/containerd/vars/main.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
containerd_sysctl_config:
net.ipv4.ip_forward: 1
net.ipv4.conf.all.forwarding: 1
net.ipv6.conf.all.forwarding: 1
net.ipv4.ip_nonlocal_bind: 1
net.bridge.bridge-nf-call-ip6tables: 1
net.bridge.bridge-nf-call-iptables: 1

0 comments on commit 06eb602

Please sign in to comment.