rougail-output-ansible/tests/results-doc/test_namespace/16_6exists_redefine_family.sh

103 lines
12 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 variables "rougail" - Rougail
▌ 🛈 Informations
▌ 
▌  basic 
New description
▌ 🛈 Informations
▌ 
▌ Path: family1
▌  basic 
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
 Variable  ┃ Description  ┃ Type  ┃ Access control  ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
family1.variable1 │ A variable. │  string    │  basic  │
│ │ │ mandatory  │ │
└───────────────────┴───────────────────┴───────────────────┴──────────────────┘
A second family
▌ 🛈 Informations
▌ 
▌ Path: family2
▌  basic 
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
 Variable  ┃ Description  ┃ Type  ┃ Access control  ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
family2.variable2 │ A second │  string    │  basic  │
│ │ variable. │ mandatory  │ │
└───────────────────┴───────────────────┴───────────────────┴──────────────────┘
Usage
Example Playbook with Rougail
Add to your structural file something like:
%YAML 1.2 
--- 
version: 1.1 
my_rougail: 
 type: rougail 
... 
Customizing hidden variables in structure file:
%YAML 1.2 
--- 
version: 1.1 
my_rougail: 
 type: rougail 
... 
▌ 🛈 Informations
▌ 
▌ Do not forget to add Rougail structure file as Rougail types.
For example you can add an YAML user data with something like:
--- 
my_rougail: 
 family1: # New description 
 variable1: string1 # A variable 
 family2: # A second family 
 variable2: string1 # A second variable 
Add to your Play:
--- 
- name: Collection | rougail.rougail.install 
 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: Collection | rougail.rougail.install 
 hosts: servers 
 vars: 
 rougail: 
 family1: # New description 
 variable1: string1 # A variable 
 family2: # A second family 
 variable2: string1 # A second variable 
 ansible.builtin.import_playbook: rougail.rougail.install