averagebit.k3d
k3d (Ansible Role)
Description
This Ansible role is used to install k3d.
Requirements
The role has been tested with the following versions of Ansible.
Name | Version |
---|---|
ansible | >= 2.9.13 |
ansible-base | >= 2.10.1 |
ansible-core | >= 2.11.2 |
Supported Platforms
The role has been tested on these operating systems.
Name | Version |
---|---|
Ubuntu | jammy |
Installation
To install the latest stable release, run:
ansible-galaxy install averagebit.k3d
To install the role from a requirements file, use:
ansible-galaxy install -r requirements.yml
Example requirements file
# requirements.yml
---
roles:
- name: averagebit.k3d
version: 1.0.0
Variables
k3d_os
- Default:
"linux"
- Description: The operating system for the binary.
- Default:
k3d_version
- Default:
"latest"
- Description: The version of the binary, e.g.,
"5.4.6"
.
- Default:
k3d_owner
- Default:
"root"
- Description: Owner of the installed binary.
- Default:
k3d_group
- Default:
"root"
- Description: Group of the installed binary.
- Default:
k3d_mode
- Default:
"0755"
- Description: Permissions of the installed binary.
- Default:
k3d_bin_dir_mode
- Default:
"0755"
- Description: Permissions of the binary's directory.
- Default:
k3d_bin_dir
- Default:
"/usr/local/share/k3d"
- Description: Directory where the binary will be installed.
- Default:
k3d_bin_path
- Default:
"{{ k3d_bin_dir }}/k3d"
- Description: Full path to the binary.
- Default:
k3d_link_path
- Default:
"/usr/local/bin/k3d"
- Description: Symlink path to the binary.
- Default:
k3d_repo_url
- Default:
"https://github.com/k3d-io/k3d"
- Description: URL of the repository.
- Default:
k3d_file_url
- Default:
"{{ k3d_repo_url }}/releases/download/v{{ k3d_version }}/k3d-{{ k3d_os }}-{{ k3d_architecture }}"
- Description: URL for the binary file.
- Default:
k3d_version_url
- Default:
"https://api.github.com/repos/k3d-io/k3d/releases/latest"
- Description: URL for fetching the latest version.
- Default:
k3d_checksum_url
- Default:
n/a
(see https://github.com/k3d-io/k3d/issues/1048) - Description: URL for the file's checksum.
- Default:
k3d_architecture
- Default:
"{{ k3d_architecture_map[ansible_architecture] }}"
- Description: Architecture target for the binary.
- Default:
k3d_architecture_map
- Default:
{"aarch": "arm64", "aarch64": "arm64", "amd64": "amd64", "arm64": "arm64", "armhf": "armhf", "armv7l": "armhf", "ppc64le": "ppc64le", "s390x": "s390x", "x86_64": "amd64"}
- Description: Maps architecture names to repository naming conventions.
- Default:
Usage
Here is how to use this role in a playbook:
# playbook.yml
- hosts: servers
roles:
- role: averagebit.k3d
become: true # necessary unless specified at the playbook's top level
tags: k3d # (optional) for easy tag-based execution
vars:
- k3d_version: latest # or a specific version like 5.4.6
Licensing
Copyright 2022 averagebit <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You can get a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
Software distributed under the License is on an "AS IS" basis, without warranties or conditions of any kind. See the License for the specific language governing permissions and limitations under the License.
Installa
ansible-galaxy install averagebit.k3d
Licenza
apache-2.0
Download
638
Proprietario