Value all
The all
value is used to simplify the declaration. It is sometimes useful to declare a resource for all target systems or for all its compatible parameters. This avoids having to repeat the declaration for each target system or for each target argument.
all
target systems
In cases where the target systems declared in the inventory are all compatible with a resource, you can use the all
value to declare compatibility with all target systems.
- .aiop
- .aml
- file.txt
- source: file.txt
destination: file.txt
compatibility:
- all:
...
For this example, the file file.txt
is compatible with all target systems declared in the inventory.
all
target arguments
In cases where the parameters of a target declared in the inventory are all compatible with a resource, you can use the all
value to declare compatibility with all parameters.
- .aiop
- .aml
- file.txt
- source: file.txt
destination: file.txt
compatibility:
- archi/range/model:
app: [all]
envs: [test, dev]
For this example, the file file.txt
is compatible with all values of the app
parameter of the archi/range/model
target.
You could very well declare the file file.txt
for each value of the app
parameter of the archi/range/model
target, but that would be very unreadable if there are many allowed values. Using the all
value simplifies the declaration.
Let's continue the example and modify the declaration so that the file file.txt
is also compatible with all values of the envs
parameter of the archi/range/model
target. This would look like:
- source: file.txt
destination: file.txt
compatibility:
- archi/range/model:
app: [all]
envs: [all]