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

118 lines
13 KiB
Bash
Raw Normal View History

2026-05-04 12:17:56 +02:00
rougail.rougail - Rougail
2026-06-11 21:36:33 +02:00
This repository contains the  rougail.rougail  Ansible collection.
2026-05-04 12:17:56 +02:00
This family is a namespace
Variables
2026-06-11 21:36:33 +02:00
The group variables "rougail" - Rougail
2026-05-04 12:17:56 +02:00
▌ 🛈 Informations
▌ 
▌  standard 
┏━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
 ┃ ┃ Default  ┃ ┃ Access  ┃ ┃
 Variable  ┃ Descripti… ┃ value  ┃ Type  ┃ control  ┃ Validator  ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
var1 │ A suffix │ • val1 │  string    │  standard  │  unique  │
│ │ variable. │ • val2 │ multiple  │ │ │
│ │ │ │ mandatory  │ │ │
├────────────┼────────────┼────────────┼────────────┼─────────────┼────────────┤
var2 │ A suffix │ val1 │  string    │  standard  │ │
│ │ variable2. │ │ mandatory  │ hidden  │ │
└────────────┴────────────┴────────────┴────────────┴─────────────┴────────────┘
dynval1 or dynval2
▌ 🛈 Informations
▌ 
▌ This family builds families dynamically.
▌ Path:
▌  • dynval1
▌  • dynval2
▌  standard 
▌ Identifiers: the value of the variable "A suffix variable" (var1).
┏━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
 ┃ ┃ ┃ ┃ Access  ┃
 Variable  ┃ Description  ┃ Default value ┃ Type  ┃ control  ┃
┡━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
dynval1.var │ A dynamic │ the value of │  string    │  standard  │
dynval2.var │ variable. │ the │ mandatory  │ │
│ │ │ identifier. │ │ │
└───────────────┴───────────────┴───────────────┴──────────────┴───────────────┘
┏━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
 ┃ ┃ ┃ ┃ Access  ┃
 Variable  ┃ Description  ┃ Default value ┃ Type  ┃ control  ┃
┡━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
var3 │ A variable │ │  string    │  standard  │
│ │ calculated. │ • the value │ mandatory  │ │
│ │ │ of the │ │ │
│ │ │ variable "A │ │ │
│ │ │ dynamic │ │ │
│ │ │ variable" │ │ │
│ │ │ (var) │ │ │
│ │ │ • the value │ │ │
│ │ │ of the │ │ │
│ │ │ variable "A │ │ │
│ │ │ dynamic │ │ │
│ │ │ variable" │ │ │
│ │ │ (var) │ │ │
└───────────────┴───────────────┴───────────────┴──────────────┴───────────────┘
▌ 🛈 Informations
▌ 
▌ Hidden variables can only be modified within a structure file.
Usage
2026-06-11 21:36:33 +02:00
Example Playbook with Rougail
2026-05-04 12:17:56 +02:00
Add to your structural file something like:
%YAML 1.2 
--- 
version: 1.1 
my_rougail: 
 type: rougail 
... 
2026-06-11 21:36:33 +02:00
Customizing hidden variables in structure file:
2026-05-04 12:17:56 +02:00
%YAML 1.2 
--- 
version: 1.1 
my_rougail: 
 type: rougail 
 var2: val1 
... 
▌ 🛈 Informations
▌ 
2026-06-11 21:36:33 +02:00
▌ Do not forget to add Rougail structure file as Rougail types.
2026-05-04 12:17:56 +02:00
2026-06-11 21:36:33 +02:00
Add to your Play:
2026-05-04 12:17:56 +02:00
--- 
- name: Rougail 
 hosts: servers 
 vars: 
 rougail: '{{ my_rougail }}' 
 ansible.builtin.import_playbook: rougail.rougail.install 
2026-06-11 21:36:33 +02:00
Example Playbook without Rougail
2026-05-04 12:17:56 +02:00
▌ 🛈 Informations
▌ 
▌ The variables will not be properly validated without Rougail.
--- 
- name: Rougail 
 hosts: servers 
 vars: {} 
 ansible.builtin.import_playbook: rougail.rougail.install