kubernetes.adm.download role

Note

This role is part of the kubernetes.adm collection (version 1.0.0).

To install it use: ansible-galaxy collection install kubernetes.adm.

To use it in a playbook, specify: kubernetes.adm.download.

Entry point download_binary – Download and install a binary file

Synopsis

Parameters

Parameter

Comments

binary_name

string / required

The final name for the binary file.

binary_path

string

The directory to store binary files.

Default: "~/.local/bin"

binary_version

string

The binary version.

completion_command

string

The shell completion command.

The expression {{ ansible_user_shell | basename }} can be used to determine the user’s shell.

download_only

boolean

When true no unarchiving is done, and the file is downloaded to download_only_path.

Choices:

  • false ← (default)

  • true

download_only_path

string

The path to store files when download_only is true

Entry point download_file – Download file

Synopsis

  • Download file from the URL download_url.

  • When download_unarchive is true, the downloaded file will be unarchived.

Parameters

Parameter

Comments

checksum_algo

string

The checksum algorithm.

checksum_file

string

The URL to a file containg the digest.

Mutually exclusive with checksum_file_suffix.

See get_url module for more info.

checksum_file_suffix

string

The suffix that will be appended to download_url to construct the checksum URL.

Mutually exclusive with checksum_file.

direct_checksum

boolean

Set to true when checksum file contains only the digest.

Work around for https://github.com/ansible/ansible/issues/54390.

Choices:

  • false ← (default)

  • true

disable_checksum

boolean

Disable checksum verification.

Choices:

  • false ← (default)

  • true

download_checksum_file

boolean

When true, the checksum file will be downloaded along side the downloaded file.

Choices:

  • false ← (default)

  • true

download_dest

string / required

The download destination.

download_file_in_archive

string

The file inside the archive that will be copied to download_dest.

Required when download_unarchive.

download_unarchive

boolean

Whether the downloaded file will be unarchived.

True when download_file_in_archive is defined

Choices:

  • false

  • true

download_url

string / required

The file URL.

file_mode

string

The file mode.

Default: "0700"

Entry point gh_binary – Download and install a binary file from Github

Synopsis

  • Download a file from the release page in a Github project.

  • Using the same URL structure used by Github, the github_base_url can point to a private location.

  • All checksum related variables in download_file are available.

Parameters

Parameter

Comments

binary_version

string

The binary version.

Unlike the release_version which reference’s a Github release.

completion_command

string

The shell completion command.

The expression {{ ansible_user_shell | basename }} can be used to determine the user shell.

download_only

boolean

When true no unarchiving is done, and the file is downloaded to download_only_path.

Choices:

  • false ← (default)

  • true

download_only_flat

boolean

When false, store files under {{ download_only_path ~ ‘/’ ~ github_project ~ ‘/releases/download/’ ~ release_version }}

Mimics the Github URL for the file.

When true, store files under download_only_path

Choices:

  • false ← (default)

  • true

download_only_path

string

The path to store files when download_only is true

github_base_url

string

The base download URL.

Default: "https://github.com"

github_project

string / required

The orginization/project names.

release_file

string / required

The file to download.

release_version

string / required

The release version.