darkwizard242.tfsec

Ansible Role: tfsec

This Ansible role is designed to install tfsec on Debian/Ubuntu and EL systems. tfsec is a tool used to scan Terraform code for security issues, created by Liam Galvin.

Requirements

There are no special requirements.

Role Variables

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

Variables list:

tfsec_app: tfsec
tfsec_version: 1.28.6
tfsec_os: "{{ ansible_system | lower }}"
tfsec_architecture_map:
  amd64: amd64
  arm: arm64
  x86_64: amd64
  armv6l: armv6
  armv7l: armv7
  aarch64: arm64
  32-bit: "386"
  64-bit: amd64
tfsec_dl_url: https://github.com/aquasecurity/{{ tfsec_app }}/releases/download/v{{ tfsec_version }}/{{ tfsec_app }}-{{ tfsec_os }}-{{ tfsec_architecture_map[ansible_architecture] }}
tfsec_bin_path: "/usr/local/bin/{{ tfsec_app }}"
tfsec_file_owner: root
tfsec_file_group: root
tfsec_file_mode: '0755'

Variables table:

Variable Description
tfsec_app Specifies the application to be installed, which is tfsec.
tfsec_version Sets the version to install, defaulting to 1.28.6.
tfsec_os Identifies the operating system type to get the correct binaries.
tfsec_architecture_map Maps the operating system architecture to the correct binaries.
tfsec_dl_url URL to download the tfsec binary from.
tfsec_bin_path Path where the tfsec binary will be stored, default is /usr/local/bin/tfsec.
tfsec_bin_permission_mode Sets the permission level for the binary file.
tfsec_file_owner Owner of the tfsec binary file.
tfsec_file_group Group for the tfsec binary file.
tfsec_file_mode Permission mode for the tfsec binary file.

Dependencies

There are no dependencies.

Example Playbook

To install tfsec using the default settings in your Ansible playbook:

- hosts: servers
  roles:
    - darkwizard242.tfsec

To specify a different version of tfsec:

- hosts: servers
  roles:
    - darkwizard242.tfsec
  vars:
    tfsec_version: 0.18.0

To change the location where the tfsec binary is placed:

- hosts: servers
  roles:
    - darkwizard242.tfsec
  vars:
    tfsec_bin_path: /bin/

License

This role is licensed under the MIT.

Author Information

This role was created by Ali Muhammad.

Informazioni sul progetto

Installs/Uninstalls 'tfsec', which was developed by Liam Galvin to perform static security analysis of terraform code.

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