darkwizard242.containerd

Ansible Role: containerd

This role installs containerd on Debian/Ubuntu and EL systems. Containerd is a standard tool for managing containers, focusing on simplicity and portability.

Requirements

No special requirements.

Role Variables

The variables you can use are listed below (found in defaults/main.yml):

Variables list:

containerd_app: containerd
containerd_version: 1.7.21
containerd_os: "{{ ansible_system | lower }}"
containerd_architecture_map:
  amd64: amd64
  arm: arm64
  x86_64: amd64
  armv6l: armv6
  armv7l: armv7
  aarch64: arm64
  32-bit: "386"
  64-bit: amd64
containerd_dl_url: "https://github.com/{{ containerd_app }}/{{ containerd_app }}/releases/download/v{{ containerd_version }}/{{ containerd_app }}-{{ containerd_version }}-{{ containerd_os }}-{{ containerd_architecture_map[ansible_architecture] }}.tar.gz"
containerd_bin_path: /usr/local/bin
containerd_files_mode: '0755'
containerd_files_owner: root
containerd_files_group: root
containerd_systemd_service_setup: true
containerd_systemd_template_in_file: containerd.service.j2
containerd_systemd_template_out_dir: /etc/systemd/system
containerd_systemd_template_out_file: containerd.service
containerd_systemd_service_enable_state: yes
containerd_systemd_service_state: started

Variables table:

Variable Description
containerd_app The application being installed, which is containerd.
containerd_version The version of containerd to install, defaulting to 1.7.21.
containerd_os Specifies the operating system type.
containerd_architecture_map Maps the OS architecture to find the right version of binaries.
containerd_dl_url The URL to download the containerd binaries archive.
containerd_bin_path The path where containerd binaries will be stored.
containerd_files_mode The permissions for the containerd binaries file.
containerd_files_owner The owner of the containerd binaries file.
containerd_files_group The group of the containerd binaries file.
containerd_systemd_service_setup Indicates whether to set up a systemd service for containerd.
containerd_systemd_template_in_file The template file used for the containerd systemd service.
containerd_systemd_template_out_dir The directory where the generated systemd service template will be stored.
containerd_systemd_template_out_file The name of the file for the containerd systemd service.
containerd_systemd_service_enable_state Determines if the containerd systemd service should start on boot.
containerd_systemd_service_state Sets the state of the containerd systemd service (e.g., started).

Dependencies

None.

Example Playbook

For default installation of containerd in Ansible playbooks:

- hosts: servers
  roles:
    - darkwizard242.containerd

To specify a different containerd version:

- hosts: servers
  roles:
    - darkwizard242.containerd
  vars:
    containerd_version: 1.5.6

To change the extraction path to /usr/bin:

- hosts: servers
  roles:
    - darkwizard242.containerd
  vars:
    containerd_bin_path: '/usr/bin'

License

MIT

Author Information

This role was created by Ali Muhammad

Informazioni sul progetto

Installs/Uninstalls 'containerd', an industry-standard container runtime.

Installa
ansible-galaxy install darkwizard242.containerd
Licenza
mit
Download
2.5k
Proprietario
Senior DevOps/CloudOps Engineer. Dedicated to Automating everything I come across. Love to work on and learn new technologies/tools everyday!