# Ansible is capable of many things

**URL:** <https://forum.ansible.com/t/ansible-is-capable-of-many-things/45931>\
**Category:** Project Discussions\
**Tags:** galaxy-ng, ansible-core\
**Created:** [June 17, 2026, 7:57am UTC](https://forum.ansible.com/t/ansible-is-capable-of-many-things/45931 "2026-06-17T07:57:51Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![kks](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kks/32/10352_2.png) [@kks](https://forum.ansible.com/u/kks)\
**Post date:** [July 26, 2026, 7:25am UTC](https://forum.ansible.com/t/ansible-is-capable-of-many-things/45931/19 "2026-07-26T07:25:41Z")

</div>

New release of capable.core212 collection - 1.2.0.

There is new action plugin to validate variable values:

[https://capable-core.github.io/collections/capable/core212/modules/validate\_vars/](https://capable-core.github.io/collections/capable/core212/modules/validate_vars/)

Unfortunately there is ongoing issue with how plugin documentation is rendered on galaxy. So no documentation there. I am working on proper modern documentation website for capable project.

Briefly main differences to already existing ansible.builtin.validate\_argument\_spec

- Strict types - int, str and types that allow coercion - str\_int, str\_bool
- Custom validation conditions with **this** keyword

```yaml
- capable.core212.validate_vars:
    custom_validation_username:
      type: str
      required: true
      custom_validation:
        - condition: **this** | length >= 5
          error_message: "Username must be at least 5 characters long."
        - condition: **this** is match('^[a-z]+$')
          error_message: "Username must contain only lowercase letters."
    custom_validation_score:
      type: int
      custom_validation:
        - condition: **this** >= 0 and **this** <= 100
          error_message: "Score must be between 0 and 100."
  vars:
    custom_validation_username: "alicea"
    custom_validation_score: 85

```

- `mutually_exclusive`, `required_together`, `required_one_of`, `required_if`, `required_by` but for ansible variables (not module arguments)  
for example:

```yaml
- capable.core212.validate_vars:
    ri_state: {type: str}
    ri_name: {type: str}
    ri_path: {type: str}
    required_if:
      - ['ri_state', 'present', ['ri_name', 'ri_path']]
  vars:
    ri_state: "present"
    ri_name: "alpha"
    ri_path: "/tmp/alpha"

```

As this is in core212 collection, works on all ansible-core versions starting from 2.12.

---

_[View the full topic](https://forum.ansible.com/t/ansible-is-capable-of-many-things/45931)._
