cloc
Ansible Role: cloc
Role to install (by default) cloc or uninstall (if passed as var) on Debian based and EL based systems. As per the official statement on the repository's GitHub page, it allows for "cloc counts blank lines, comment lines, and physical lines of source code in many programming languages."
Requirements
None.
Role Variables
Available variables are listed below (located in defaults/main.yml
):
Variables list:
cloc_app: cloc
cloc_desired_state: present
Variables table:
Variable | Description |
---|---|
cloc_app | Defines the app to install i.e. cloc |
cloc_desired_state | Defined to dynamically chose whether to install (i.e. either present or latest ) or uninstall (i.e. absent ) the package. Defaults to present . |
Dependencies
None
Example Playbook
For default behaviour of role (i.e. installation of cloc package) in ansible playbooks.
- hosts: servers
roles:
- darkwizard242.cloc
For customizing behavior of role (i.e. installation of latest cloc package) in ansible playbooks.
- hosts: servers
roles:
- darkwizard242.cloc
vars:
cloc_desired_state: latest
For customizing behavior of role (i.e. un-installation of cloc package) in ansible playbooks.
- hosts: servers
roles:
- darkwizard242.cloc
vars:
cloc_desired_state: absent
License
Author Information
This role was created by Ali Muhammad.
About
Installation/Uninstallation of `cloc`. Used for Counting Lines of Code.
Install
ansible-galaxy install darkwizard242/ansible-role-cloc
License
mit
Downloads
2858
Owner
Senior DevOps/CloudOps Engineer.
Dedicated to Automating everything I come across.
Love to work on and learn new technologies/tools everyday!