rougail-output-ansible/tests/results-doc/test_namespace_mandatory/04_5hidden_calculation2.sh

95 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 
┏━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
 ┃ ┃ ┃ ┃ Access  ┃
 Variable  ┃ Description  ┃ Default value ┃ Type  ┃ control  ┃
┡━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
condition │ A condition. │ no │  string    │  standard  │
│ │ │ │ mandatory  │ │
├───────────────┼───────────────┼───────────────┼──────────────┼───────────────┤
var1 │ A first │ the value of │  string    │  standard    │
│ │ variable. │ condition. │ mandatory  │ hidden  │
│ │ │ │ │ Hidden: if
│ │ │ │ │ condition is │
│ │ │ │ │ yes. │
├───────────────┼───────────────┼───────────────┼──────────────┼───────────────┤
var2 │ A second │ the value of │  string    │  standard    │
│ │ variable. │ condition. │ mandatory  │ hidden  │
│ │ │ │ │ Hidden: if
│ │ │ │ │ condition is │
│ │ │ │ │ yes. │
└───────────────┴───────────────┴───────────────┴──────────────┴───────────────┘
▌ 🛈 Informations
▌ 
▌ Hidden variables can only be modified within a structure file.
Usage
Example playbook with Rougail
Add to your structural file something like:
%YAML 1.2 
--- 
version: 1.1 
my_rougail: 
 type: rougail 
... 
Customizing hidden variable in structural files:
%YAML 1.2 
--- 
version: 1.1 
my_rougail: 
 type: rougail 
 var1: string1 
 var2: string1 
... 
▌ 🛈 Informations
▌ 
▌ Do not forget to add Rougail structural file as Rougail types.
For example you can add an YAML user data with something like:
--- 
my_rougail: 
 condition: string1 # A condition 
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: 
 rougail: 
 condition: string1 # A condition 
 ansible.builtin.import_playbook: rougail.rougail.install