rougail-output-ansible/tests/results-doc/test_namespace/60_5family_dynamic_variable_outside2.sh

105 lines
11 KiB
Bash
Raw Normal View History

2026-05-04 12:17:56 +02:00
rougail.rougail - Rougail
2026-01-14 14:25:35 +01:00
2026-05-04 12:17:56 +02:00
This repository contains the  rougail.rougail  Ansible Collection.
2026-01-14 14:25:35 +01:00
2026-05-04 12:17:56 +02:00
This family is a namespace
2026-01-14 14:25:35 +01:00
2026-05-04 12:17:56 +02:00
Variables
The group variable "rougail" - Rougail
▌ 🛈 Informations
▌ 
▌  standard 
2026-01-14 14:25:35 +01:00
2026-02-21 21:31:34 +01:00
┏━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
 ┃ ┃ Default  ┃ ┃ Access  ┃ ┃
 Variable  ┃ Descripti… ┃ value  ┃ Type  ┃ control  ┃ Validator  ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
2026-05-04 12:17:56 +02:00
var2 │ A │ │  string    │  standard  │  unique  │
│ │ variable. │ • the │ multiple  │ │ │
│ │ │ value of │ mandatory  │ │ │
│ │ │ the │ │ │ │
2026-02-21 21:31:34 +01:00
│ │ │ variable │ │ │ │
2026-05-04 12:17:56 +02:00
│ │ │ "a │ │ │ │
│ │ │ variable │ │ │ │
│ │ │ inside a │ │ │ │
│ │ │ dynamic │ │ │ │
│ │ │ family" │ │ │ │
│ │ │ (var) │ │ │ │
2026-02-21 21:31:34 +01:00
│ │ │ • the │ │ │ │
│ │ │ value of │ │ │ │
│ │ │ the │ │ │ │
│ │ │ variable │ │ │ │
2026-05-04 12:17:56 +02:00
│ │ │ "a │ │ │ │
│ │ │ variable │ │ │ │
│ │ │ inside a │ │ │ │
│ │ │ dynamic │ │ │ │
│ │ │ family" │ │ │ │
│ │ │ (var) │ │ │ │
2026-02-21 21:31:34 +01:00
├────────────┼────────────┼────────────┼────────────┼─────────────┼────────────┤
var │ A suffix │ • val1 │  string    │  standard  │  unique  │
│ │ variable. │ • val2 │ multiple  │ │ │
│ │ │ │ mandatory  │ │ │
└────────────┴────────────┴────────────┴────────────┴─────────────┴────────────┘
2026-01-14 14:25:35 +01:00
2026-05-04 12:17:56 +02:00
A dynamic family
▌ 🛈 Informations
▌ 
▌ This family builds families dynamically.
▌ Path:
▌  • my_dyn_family_val1
▌  • my_dyn_family_val2
▌  standard 
▌ Identifiers: the value of the variable "a suffix variable" (var).
2026-01-14 14:25:35 +01:00
2026-02-21 21:31:34 +01:00
┏━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
 ┃ ┃ ┃ ┃ Access  ┃
 Variable  ┃ Description  ┃ Default value ┃ Type  ┃ control  ┃
┡━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
my_dyn_famil… │ A variable │ the value of │  string  │  standard  │
my_dyn_famil… │ inside a │ the │ │ │
2026-05-04 12:17:56 +02:00
│ │ dynamic │ identifier. │ │ │
2026-02-21 21:31:34 +01:00
│ │ family. │ │ │ │
└───────────────┴───────────────┴───────────────┴──────────────┴───────────────┘
2026-01-14 14:25:35 +01:00
2026-05-04 12:17:56 +02:00
Usage
2026-01-14 14:25:35 +01:00
2026-05-04 12:17:56 +02:00
Example playbook with Rougail
2026-01-21 08:55:24 +01:00
Add to your structural file something like:
2026-05-04 12:17:56 +02:00
%YAML 1.2 
2026-02-21 21:31:34 +01:00
--- 
2026-05-04 12:17:56 +02:00
version: 1.1 
my_rougail: 
 type: rougail 
... 
2026-01-21 08:55:24 +01:00
2026-05-04 12:17:56 +02:00
▌ 🛈 Informations
▌ 
▌ Do not forget to add Rougail structural file as Rougail types.
2026-01-21 08:55:24 +01:00
2026-05-04 12:17:56 +02:00
Add to your play:
2026-01-21 08:55:24 +01:00
2026-02-21 21:31:34 +01:00
--- 
- name: Rougail 
2026-05-04 12:17:56 +02:00
 hosts: servers 
 vars: 
 rougail: '{{ my_rougail }}' 
 ansible.builtin.import_playbook: rougail.rougail.install 
2026-01-21 08:55:24 +01:00
2026-05-04 12:17:56 +02:00
Example playbook without Rougail
▌ 🛈 Informations
▌ 
▌ The variables will not be properly validated without Rougail.
2026-01-14 14:25:35 +01:00
2026-02-21 21:31:34 +01:00
--- 
- name: Rougail 
2026-05-04 12:17:56 +02:00
 hosts: servers 
 vars: {} 
 ansible.builtin.import_playbook: rougail.rougail.install