Skip to content

darkwizard242/ansible-role-tfsec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

24dc696 · May 11, 2021
Dec 19, 2020
May 11, 2021
Apr 14, 2021
Dec 8, 2020
Jul 8, 2020
Dec 8, 2020
Dec 8, 2020
Mar 7, 2021
May 11, 2021
Dec 8, 2020

Repository files navigation

build-test release Ansible Role Ansible Role Ansible Quality Score Quality Gate Status Maintainability Rating Reliability Rating Security Rating GitHub tag (latest SemVer) GitHub repo size

Ansible Role: tfsec

Role to install (by default) tfsec on Debian/Ubuntu and EL systems. tfsec is a static analysis (security based) for scanning terraform code. originally developed by Liam Galvin.

Requirements

None.

Role Variables

Available variables are listed below (located in defaults/main.yml):

Variables list:

tfsec_app: tfsec
tfsec_version: 0.39.32
tfsec_osarch: linux-amd64
tfsec_dl_url: https://github.com/liamg/{{ tfsec_app }}/releases/download/v{{ tfsec_version }}/{{ tfsec_app }}-{{ tfsec_osarch }}
tfsec_bin_path: "/usr/local/bin/{{ tfsec_app }}"
tfsec_bin_permission_mode: '0755'

Variables table:

Variable Value (default) Description
tfsec_app tfsec Defines the app to install i.e. tfsec
tfsec_version 0.39.32 Defined to dynamically fetch the desired version to install. Defaults to: 0.39.32
tfsec_osarch linux-amd64 Defines os architecture. Used for obtaining the correct type of binaries based on OS System Architecture. Defaults to: linux-amd64
tfsec_dl_url https://github.com/liamg/{{ tfsec_app }}/releases/download/v{{ tfsec_version }}/{{ tfsec_app }}-{{ tfsec_osarch }} Defines URL to download the tfsec binary from.
tfsec_bin_path "/usr/local/bin/{{ tfsec_app }}" Defined to dynamically set the appropriate path to store tfsec binary into. Defaults to (as generally available on any user's PATH): /usr/local/bin/tfsec
tfsec_bin_permission_mode '0755' Defines the permission mode level for the file.

Dependencies

None

Example Playbook

For default behaviour of role (i.e. installation of tfsec) in ansible playbooks.

- hosts: servers
  roles:
    - darkwizard242.tfsec

For customizing behavior of role (i.e. specifying the desired tfsec version) in ansible playbooks.

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

For customizing behavior of role (i.e. placing binary of tfsec package in different location) in ansible playbooks.

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

License

MIT

Author Information

This role was created by Ali Muhammad.