darkwizard242.checkov
Ansible Role: checkov
This role installs the checkov package using pip on Debian/Ubuntu systems. Checkov is used for static code analysis, checking code against established standards and policies for popular Infrastructure as Code (IaC) tools like Terraform, CloudFormation, and Kubernetes.
Requirements
There are no special requirements.
Role Variables
Here are the variables you can use, found in defaults/main.yml
:
Variables List:
checkov_debian_pre_reqs:
- python3
- python3-pip
checkov_debian_pre_reqs_desired_state: present
pip_executable: pip3
pip_upgrade_version: latest
checkov_app_debian_package: checkov
checkov_desired_state: present
Variables table:
Variable | Description |
---|---|
checkov_debian_pre_reqs | Packages needed to install checkov on Debian systems. Use python3 since python2.x is no longer supported as of the end of 2020. |
checkov_debian_pre_reqs_desired_state | Desired status for the necessary applications to install checkov on Debian systems. |
pip_executable | The command used to install Python packages like checkov . |
checkov_app_debian_package | The name of the checkov package to be installed on Debian systems, which is checkov . |
checkov_desired_state | Desired installation status for checkov. |
Dependencies
There are no dependencies.
Example Playbook
To use the role in Ansible playbooks (default behavior: install checkov package):
- hosts: servers
roles:
- darkwizard242.checkov
To customize the role (e.g., install the latest version of checkov instead of ensuring it's just installed):
- hosts: servers
roles:
- darkwizard242.checkov
vars:
checkov_desired_state: latest
To customize further (e.g., remove the checkov package):
- hosts: servers
roles:
- darkwizard242.checkov
vars:
checkov_desired_state: absent
License
This project is licensed under the MIT license.
Author Information
This role was developed by Ali Muhammad, a DevOps/CloudOps Engineer passionate about learning and contributing to the Open Source community.
Installs checkov using pip3 package for performing static code analysis of popular IaC tools.
ansible-galaxy install darkwizard242.checkov