Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



Question
In YAML, for lists, all items in the list are at the same indentation and start with the following syntax: [...]
Answer

"- "

^^^ NOTE the space after the dash.

Here is named list example:

fruits:
   - apple
   - pear
   - orange

Here is an unamed list example (from Ansible, where you have list of plays in a playbook):

---
# This playbook deploys the whole application stack in this site.

- name: apply common configuration to all nodes
  hosts: all
  remote_user: root

  roles:
    - common

- name: configure and deploy the webservers and application code
  hosts: webservers
  remote_user: root

  roles:
    - web

- name: deploy MySQL and configure the databases
  hosts: dbservers
  remote_user: root

  roles:
    - db


Question
In YAML, for lists, all items in the list are at the same indentation and start with the following syntax: [...]
Answer
?

Question
In YAML, for lists, all items in the list are at the same indentation and start with the following syntax: [...]
Answer

"- "

^^^ NOTE the space after the dash.

Here is named list example:

fruits:
   - apple
   - pear
   - orange

Here is an unamed list example (from Ansible, where you have list of plays in a playbook):

---
# This playbook deploys the whole application stack in this site.

- name: apply common configuration to all nodes
  hosts: all
  remote_user: root

  roles:
    - common

- name: configure and deploy the webservers and application code
  hosts: webservers
  remote_user: root

  roles:
    - web

- name: deploy MySQL and configure the databases
  hosts: dbservers
  remote_user: root

  roles:
    - db

If you want to change selection, open document below and click on "Move attachment"

YAML Syntax — Ansible Documentation
l YAML files (regardless of their association with Ansible or not) can optionally begin with --- and end with .... This is part of the YAML format and indicates the start and end of a document. <span>All members of a list are lines beginning at the same indentation level starting with a "- " (a dash and a space): --- # A list of tasty fruits fruits: - Apple - Orange - Strawberry - Mango ... A dictionary is represented in a simple key: value form (the colon must be followed

Summary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.