-
Notifications
You must be signed in to change notification settings - Fork 601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More detailed info on block scalars #2319
base: devel
Are you sure you want to change the base?
Conversation
Thanks for your Ansible docs contribution! We talk about Ansible documentation on Matrix at #docs:ansible.im if you ever want to join us and chat about the docs! We meet on Matrix every Tuesday. See the Ansible calendar for meeting details. We welcome additions to our weekly agenda items too. You can add the |
Thanks for your contribution, @kk-at-redhat! Please make sure that your pull request includes sufficient and meaningful details in the description. |
@@ -18,15 +18,13 @@ is used in practice. | |||
YAML Basics | |||
----------- | |||
|
|||
For Ansible, nearly every YAML file starts with a list. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All play and task files are lists
All files that define variables are dictionaries
@@ -68,19 +66,18 @@ More complicated data structures are possible, such as lists of dictionaries, di | |||
- fortran | |||
- erlang | |||
|
|||
Dictionaries and lists can also be represented in an abbreviated form if you really want to: | |||
Dictionaries and lists can also be written in a short form called "Flow collections": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aka YAML shorthand, which is also a superset of JSON
Using a "Folded Block Scalar" ``>`` will fold newlines to spaces; it is used to make what would otherwise be a very long line easier to read and edit. | ||
In either case the indentation will be ignored. | ||
Examples are: | ||
Values can be written as multiple lines using "Block Scalars". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String values
No description provided.