rougail-output-ansible/tests/results-doc/test_namespace_mandatory/00_6choice.sh

85 lines
10 KiB
Bash
Raw Normal View History

2026-01-14 14:25:35 +01:00
Ansible role: Rougail
▌ 🛈 Informations
▌ 
▌  basic 
Role variables
2026-02-21 21:31:34 +01:00
┏━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
 ┃ ┃ Default  ┃ ┃ Access  ┃ ┃
 Variable  ┃ Descripti… ┃ value  ┃ Type  ┃ control  ┃ Validator  ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
var1 │ The first │ │  choice    │  basic  │ Choices: │
│ │ variable. │ │ mandatory  │ │ • a │
│ │ │ │ │ │ • b │
│ │ │ │ │ │ • c │
├────────────┼────────────┼────────────┼────────────┼─────────────┼────────────┤
var2 │ The second │ │  choice    │  basic  │ Choices: │
│ │ variable. │ │ mandatory  │ │ • a │
│ │ │ │ │ │ • b │
│ │ │ │ │ │ • c │
├────────────┼────────────┼────────────┼────────────┼─────────────┼────────────┤
var3 │ The third │ │  choice  │  standard  │ Choices: │
│ │ variable. │ │ │ │ • a │
│ │ │ │ │ │ • b │
│ │ │ │ │ │ • c │
│ │ │ │ │ │ • null │
├────────────┼────────────┼────────────┼────────────┼─────────────┼────────────┤
var4 │ The forth │ │  choice  │  standard  │ Choices: │
│ │ variable. │ │ │ │ • null │
│ │ │ │ │ │ • b │
│ │ │ │ │ │ • c │
├────────────┼────────────┼────────────┼────────────┼─────────────┼────────────┤
var5 │ The fifth │ a │  choice    │  standard  │ Choices: │
│ │ variable. │ │ mandatory  │ │ • a │
│ │ │ │ │ │ • b │
│ │ │ │ │ │ • c │
├────────────┼────────────┼────────────┼────────────┼─────────────┼────────────┤
var6 │ The sixth │ 1 choice    │  standard  │ Choices: │
│ │ variable. │ │ mandatory  │ │ • 1
│ │ │ │ │ │ • 2
│ │ │ │ │ │ • 3
└────────────┴────────────┴────────────┴────────────┴─────────────┴────────────┘
2026-01-14 14:25:35 +01:00
2026-01-21 08:55:24 +01:00
Example playbook with Rougail
▌ 🛈 Informations
▌ 
2026-02-21 21:44:55 +01:00
▌ Do not forget to add Rougail structural file as Rougail types.
2026-01-21 08:55:24 +01:00
Add to your structural file something like:
2026-02-21 21:31:34 +01:00
--- 
path: 
 to: 
 my_rougail: 
 type: rougail 
 var1: a 
 var2: a 
2026-01-21 08:55:24 +01:00
Add to your playbook:
2026-02-21 21:31:34 +01:00
--- 
- name: Rougail 
 hosts: server 
 roles: 
 - role: <author>.rougail 
 vars: path.to.rougail 
2026-01-21 08:55:24 +01:00
2026-01-14 14:25:35 +01:00
Example playbook
2026-02-21 21:31:34 +01:00
--- 
- name: Rougail 
 hosts: server 
 roles: 
 - role: <author>.rougail 
 vars: 
 rougail: # Rougail 
 var1: a # The first variable 
 var2: a # The second variable