Hero Background
Variable as Code with Rougail

Centralize variables for specialize tools

Rougail is a robust and powerful, free/open-source configuration manager. In this context, "configuration" must be understood as a set of variables whose values are of high quality, consistent, and subject to access control. This configuration will then be used by other tools.

Essential Features

Rougail the single source of truth for your variables

Command line and python library

Rougail is a library written in Python but is generally used directly from the command line.

Variable-first DSL

Rougail is also a format — a Domain-Specific Language for describing variables that uses pure YAML and Jinja templates.

Variable as Code

The variable itself becomes a software artifact; variables are described in the Rougail format language — the structured data; which is written in source code file — the structured file.

Variable - value separation

The variable is defined at compile time — structural data; the value is loaded and validated at runtime — user data.

Variable for specialize tools

The variables are centralized and can then be used in specialized applications — output.

Secret management

Rougail allows variables to be marked as "secrets" so they are not unnecessarily exposed.

Structured data

The structured data are written in Rougail format. This format is a variable-first DSL (Domain-Specific Language) designed for describing variables, consistency and describe the relationships between variables in a declarative style.

Variable lifecycle Mutability Value
Creation
Initialize
Mutable Mutable default value
Structured data describe in Rougail format
Documentation data in structured data

User data

We refer to "user data" for modified values, as opposed to default values. While "structural data" is defined in a unique way, "user data" can originate from various sources.

Variable lifecycle Mutability Value
Reading
Assignment
Access control
Immutable Read write
Load environment value
Load YAML value
Load command line value
Load Ansible value
Load Bitwarden value

Output

We now have variables and values assigned to them. We need to use them. There are two types of outputs: outputs specific to Rougail and data exports.

Variable lifecycle Mutability Value
Reading
Access control
Immutable Read only

Outputs specific to Rougail

Display the configuration
Documentation the configuration
Changelog for the configuration
Example documentation for the configuration
Verify, format and upgrade structured file
Table build from the configuration

Outputs format

Display in a console

My user

Describe an user with a list of informations.
Path: user

Variable Description
user.surname
string mandatory
The user's surname.
user.firstname
string multiple mandatory unique
The user's first names.
user.secret
secret mandatory
The secret of the user.
Validator: "The user's surname" (user.surname) must not part of the secret

My user

🛈 Informations

Describe an user with a list of informations.
Path: user

Variable

Description

user.surname
string mandatory

The user’s surname.

user.firstname
string multiple mandatory unique

The user’s first names.

user.secret
secret mandatory

The secret of the user.
Validator: "The user’s surname" (user.surname) must not part of the secret

My user

🛈 Informations

Describe an user with a list of informations.

Path: user

VariableDescription
user.surname
string mandatory
The user's surname.
user.firstname
string multiple mandatory unique
The user's first names.
user.secret
secret mandatory
The secret of the user.
Validator: "The user's surname" must not part of the secret

Outputs data exports

Export the configuration to environment variables
Export the configuration to JSON
Export the configuration to Ansible format
Export the configuration to HCL format

Contributing

Rougail is an open-source project made with ❤️.