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

104 lines
11 KiB
Bash
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

rougail.rougail - Rougail
This repository contains the  rougail.rougail  Ansible Collection.
This family is a namespace
Variables
The group variable "rougail" - Rougail
▌ 🛈 Informations
▌ 
▌  standard 
┏━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
 ┃ ┃ Default  ┃ ┃ Access  ┃ ┃
 Variable  ┃ Descripti… ┃ value  ┃ Type  ┃ control  ┃ Validator  ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
var2 │ A │ │  string    │  standard  │  unique  │
│ │ variable. │ • the │ multiple  │ │ │
│ │ │ value of │ mandatory  │ │ │
│ │ │ the │ │ │ │
│ │ │ variable │ │ │ │
│ │ │ "a │ │ │ │
│ │ │ variable │ │ │ │
│ │ │ inside a │ │ │ │
│ │ │ dynamic │ │ │ │
│ │ │ family" │ │ │ │
│ │ │ (var) │ │ │ │
│ │ │ • the │ │ │ │
│ │ │ value of │ │ │ │
│ │ │ the │ │ │ │
│ │ │ variable │ │ │ │
│ │ │ "a │ │ │ │
│ │ │ variable │ │ │ │
│ │ │ inside a │ │ │ │
│ │ │ dynamic │ │ │ │
│ │ │ family" │ │ │ │
│ │ │ (var) │ │ │ │
├────────────┼────────────┼────────────┼────────────┼─────────────┼────────────┤
var │ A suffix │ • val1 │  string    │  standard  │  unique  │
│ │ variable. │ • val2 │ multiple  │ │ │
│ │ │ │ mandatory  │ │ │
└────────────┴────────────┴────────────┴────────────┴─────────────┴────────────┘
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).
┏━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
 ┃ ┃ ┃ ┃ Access  ┃
 Variable  ┃ Description  ┃ Default value ┃ Type  ┃ control  ┃
┡━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
my_dyn_famil… │ A variable │ the value of │  string  │  standard  │
my_dyn_famil… │ inside a │ the │ │ │
│ │ dynamic │ identifier. │ │ │
│ │ family. │ │ │ │
└───────────────┴───────────────┴───────────────┴──────────────┴───────────────┘
Usage
Example playbook with Rougail
Add to your structural file something like:
%YAML 1.2 
--- 
version: 1.1 
my_rougail: 
 type: rougail 
... 
▌ 🛈 Informations
▌ 
▌ Do not forget to add Rougail structural file as Rougail types.
Add to your play:
--- 
- name: Rougail 
 hosts: servers 
 vars: 
 rougail: '{{ my_rougail }}' 
 ansible.builtin.import_playbook: rougail.rougail.install 
Example playbook without Rougail
▌ 🛈 Informations
▌ 
▌ The variables will not be properly validated without Rougail.
--- 
- name: Rougail 
 hosts: servers 
 vars: {} 
 ansible.builtin.import_playbook: rougail.rougail.install