Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Little Timmy will try their best to find those unused Ansible variables.
cd repo/ansible/plays
ansible-galaxy collection install -f -r requirements.yml -p .
ansible-galaxy role install -f -r requirements.yml -p galaxy_roles
pip3 install little-timmy
little-timmy
# or
python3 -m little_timmy
It will find most unused variables in:
group_vars
host_vars
vars
defaults
set_facts
- when not defined as key value pairs on a single lineregister
It is unlikely to find unused variables or may generate false positives for:
False positives can be ignored with a config file detailed in the Config section.
Please raise issues with ideas or contributions with improvements!
Workflow
name: little-timmy
on:
push:
jobs:
little-timmy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run action
uses: hoo29/little-timmy@v2-action
Variables
inputs:
directory:
description: The root directory for your ansible
required: false
default: "."
additional_cli_args:
description: Additional CLI arguments to pass to little-timmy
required: false
default: ""
galaxy_role_requirements_file:
description: Location, relative to `directory`, of the ansible galaxy roles requirements file.
required: false
galaxy_collection_requirements_file:
description: Location, relative to `directory`, of the ansible galaxy collections requirements file.
required: false
ansible_vault_password:
description: |
Optional ansible-vault password. The content will be a written to a
file and ANSIBLE_VAULT_PASSWORD_FILE set to its location. Only used
by ansible if a vaulted value is found.
required: false
default: replace-me-if-vault-is-used
The latest version can be found in CHANGELOG.md.
The tags on this repo are used for the Github action and do not relate the published python module.
Additional, optional configuration can be specified in a YAML configuration file named .little-timmy
.
The file can be located at any level between the current working directory and /
.
The schema for the file is:
{
"type": "object",
"properties": {
"galaxy_dirs": {
"description": "Directories where ansible-galaxy collections and roles have been installed. Must be within the directory being scanned.",
"default": ["ansible_collections", "galaxy_roles"],
"type": "array",
"items": {
"type": "string"
}
},
"skip_vars": {
"description": "Variables to skip checking.",
"default": [],
"type": "array",
"items": {
"type": "string"
}
},
"skip_dirs": {
"description": "Directories to skip loading files from.",
"default": ["molecule", "venv", "tests"],
"type": "array",
"items": {
"type": "string"
}
},
"extra_jinja_context_keys": {
"description": """
Locations where there is already a jinja context for evaluation e.g. `when` and `assert.that`.
Does not require module FQCN. Values are added to .config_loader.DEFAULT_JINJA_CONTEXT_KEYS.
""",
"default": [],
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": False
}
little-timmy -h
usage: little-timmy [OPTIONS] [directory]
Process a directory path
positional arguments:
directory The directory to process
options:
-h, --help show this help message and exit
-c CONFIG_FILE, --config-file CONFIG_FILE
Config file to use. By default it will search all dirs to `/` for .little-timmy
-d, --dave-mode, --no-dave-mode
Make logging work on dave's macbook.
-e, --exit-success, --no-exit-success
Exit 0 when unused vars are found.
-g, --github-action, --no-github-action
Output results for github actions.
-j, --json-output, --no-json-output
Output results as json to stdout. Disables the stderr logger.
-l LOG_LEVEL, --log-level LOG_LEVEL
set the logging level (default: INFO).
-v, --version, --no-version
Output the version.
FAQs
Little Timmy will try their best to find those unused Ansible variables.
We found that little-timmy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.