0% found this document useful (0 votes)
21 views1 page

Yaml

Ansible utilizes YAML syntax for task computation, which is a human-readable data serialization language. YAML files start with three hyphens and use specific formats for declaring variables, boolean values, lists, and associative arrays. Complex data structures can be created by combining these elements.

Uploaded by

hai4monitor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views1 page

Yaml

Ansible utilizes YAML syntax for task computation, which is a human-readable data serialization language. YAML files start with three hyphens and use specific formats for declaring variables, boolean values, lists, and associative arrays. Complex data structures can be created by combining these elements.

Uploaded by

hai4monitor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

YAML Files

Ansible uses YAML syntax to compute the tasks. YAML is a data serialization language
is can be easily read and understood by any person. The syntax and format of a YAML
file is as follows:

1. Each file begins with three hyphens (---)

2. Declaring a variable has the syntax var_name:var_result


ex:

answer: 42

3. Boolean values are Yes/No

4. A list item begins with a hyphen followed by a space then the name. Below is a
list of animals
ex:

- Cats
- Dogs

5. Associative arrays begin with a hyphen followed by a space then


var_name:var_result
ex:

- Cats:Persian
- Dogs:Pugs

6. You can combine associative arrays and lists to make a data structure
ex:

--- #Pets
Cats:
- name: Persian
life_span: 14.1
- name: Burmese
life_span: 15
Dogs:
- name: Pug
life_span: 11
- name: Corgi
life_span: 15

You might also like