https://github.com/darkwizard242/ansible-role-cloc
Ansible role for cloc. Available on Ansible Galaxy.
https://github.com/darkwizard242/ansible-role-cloc
ansible ansible-galaxy ansible-role cloc development linux system
Last synced: 5 months ago
JSON representation
Ansible role for cloc. Available on Ansible Galaxy.
- Host: GitHub
- URL: https://github.com/darkwizard242/ansible-role-cloc
- Owner: darkwizard242
- License: mit
- Created: 2020-09-17T16:42:06.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-20T18:14:44.000Z (almost 2 years ago)
- Last Synced: 2025-05-19T04:37:01.164Z (about 1 year ago)
- Topics: ansible, ansible-galaxy, ansible-role, cloc, development, linux, system
- Language: Python
- Homepage: https://galaxy.ansible.com/darkwizard242/cloc
- Size: 39.1 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/darkwizard242/ansible-role-cloc/actions?query=workflow%3Abuild-and-test) [](https://github.com/darkwizard242/ansible-role-cloc/actions?query=workflow%3Arelease)  [](https://sonarcloud.io/dashboard?id=ansible-role-cloc) [](https://sonarcloud.io/dashboard?id=ansible-role-cloc) [](https://sonarcloud.io/dashboard?id=ansible-role-cloc)  
# Ansible Role: cloc
Role to install (_by default_) [cloc](https://github.com/AlDanial/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:
```yaml
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.
```yaml
- hosts: servers
roles:
- darkwizard242.cloc
```
For customizing behavior of role (i.e. installation of latest **cloc** package) in ansible playbooks.
```yaml
- 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.
```yaml
- hosts: servers
roles:
- darkwizard242.cloc
vars:
cloc_desired_state: absent
```
## License
[MIT](https://github.com/darkwizard242/ansible-role-cloc/blob/master/LICENSE)
## Author Information
This role was created by [Ali Muhammad](https://www.alimuhammad.dev/).