
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
ansible-lint-custom-strict-naming
Advanced tools
Ansible is a powerful tool for configuration management. But it is difficult to maintain the YAML playbook quality. Variable maintenance is one of the difficult tasks because they can be overwritten unexpectedly, if you don't care about such like precedence and position where variables are defined.
This is a strict rule for variable naming, using ansible-lint. Strict naming rule is useful to avoid name collision and to search defined position.
<role_name>_role__
, <task_name>_tasks__
prefix | Variables defined in |
---|---|
<role_name>_role__ | roles/<role_name>/tasks/ |
<role_name>_tasks__ | <not_roles>/**/tasks/ |
In ansible-lint, var-naming[no-role-prefix]
require to use <role_name>_
as prefix. But it is not enough to avoid name collision or search defined position. So, I add _role__
or _tasks__
to the prefix.
var__
, const__
var__
prefix
ansible.builtin.set_fact
or register
const__
prefix
ansible.builtin.set_fact
or register
tasks/<name>.yml
or roles/<name>/tasks/main.yml
<name>_role__var__
prefix
roles/<name>/tasks/main.yml
.<name>_role__const__
prefix
roles/<name>/vars/main.yml
and shouldn't be changed dynamically.some_role__arg__
prefix
ansible.builtin.include_role
's vars
key and shouldn't be changed dynamically.some_role__args
These variables are defined by ansible.builtin.include_role
's vars
key and shouldn't be changed dynamically.
- name: Sample
ansible.builtin.include_role:
name: some_role
vars:
some_role__arg__key1: value1
some_role__arg__key2: value2
This is useful when you want to send vars as dict.
- name: Sample
ansible.builtin.include_role:
name: some_role
vars:
some_role__args:
key1: value1
key2: value2
_
) is used to separate words. Double underscores (__
) are used to separate chunks for readability.var__send_message__user_id
var__send_message__content
some_role__const__app_config__name
some_role__const__app_config__token
some_role__const__app_config__version
FAQs
Add your description here
We found that ansible-lint-custom-strict-naming 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.