darkwizard242.syft
Ansible Role: syft
This Ansible role installs syft on Debian/Ubuntu and EL systems by default. Syft is a command-line tool and Go library used to create a Software Bill of Materials (SBOM) from container images and file systems.
Requirements
No prerequisites are needed.
Role Variables
Here are the available variables (found in defaults/main.yml
):
List of Variables:
syft_app: syft
syft_desired_state: present
syft_version: 1.11.1
syft_os: "{{ ansible_system | lower }}"
syft_architecture_map:
amd64: amd64
arm: arm64
x86_64: amd64
armv6l: armv6
armv7l: armv7
aarch64: arm64
32-bit: "386"
64-bit: amd64
# For Debian/Ubuntu
syft_debian_url: "https://github.com/anchore/{{ syft_app }}/releases/download/v{{ syft_version }}/{{ syft_app }}_{{ syft_version }}_{{ syft_os }}_{{ syft_architecture_map[ansible_architecture] }}.deb"
# For EL Family
syft_el_url: "https://github.com/anchore/{{ syft_app }}/releases/download/v{{ syft_version }}/{{ syft_app }}_{{ syft_version }}_{{ syft_os }}_{{ syft_architecture_map[ansible_architecture] }}.rpm"
Variables Overview:
Variable | Description |
---|---|
syft_app | Name of the app to install, which is syft. |
syft_desired_state | Indicates whether to install (use present or latest ) or uninstall (use absent ) the package. Defaults to present . |
syft_version | Specifies the version of syft to install, with a default of 1.11.1. |
syft_os | Indicates the operating system type, used to get the correct binaries. |
syft_architecture_map | Shows the system architecture for obtaining the right binaries. |
syft_debian_url | URL to download the deb package for Debian/Ubuntu systems. |
syft_el_url | URL to download the rpm package for EL family systems. |
Dependencies
No dependencies required.
Example Playbook
To use the role and install syft with the default settings, add this to your Ansible playbook:
- hosts: servers
roles:
- darkwizard242.syft
To customize the behavior and specify a different version of syft, you can do this:
- hosts: servers
roles:
- darkwizard242.syft
vars:
syft_version: 0.32.2
To customize for a different system architecture (like arm64), use the following:
- hosts: servers
roles:
- darkwizard242.syft
vars:
syft_arch: "arm64"
License
This role is licensed under the MIT License.
Author Information
This role was created by Ali Muhammad.
Informazioni sul progetto
Installs/Uninstalls 'syft'. A CLI tool and Go library for generating a Software Bill of Materials (SBOM) from container images and filesystems.
Installa
ansible-galaxy install darkwizard242.syft
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!