Questions tagged [yaml]

Use this tag for questions about the YAML data serialization format only, not for questions about programs (or examples) that happen to have their configuration in a YAML format.

From the Wikipedia article about YAML:

YAML (/ˈjæməl/, rhymes with camel) is a human-readable data serialization language that takes concepts from programming languages such as C, Perl, and Python, and ideas from XML and the data format of electronic mail (RFC 2822). YAML was first proposed by Clark Evans in 2001, who designed it together with Ingy döt Net and Oren Ben-Kiki. It is available for several programming languages.

YAML is a recursive acronym for "YAML Ain't Markup Language". Early in its development, YAML was said to mean "Yet Another Markup Language", but it was then reinterpreted (backronyming the original acronym) to distinguish its purpose as data-oriented, rather than document markup.

Features:

  • Its familiar indented outline and lean appearance make it especially suited for tasks where humans are likely to view or edit data structures, such as configuration files, dumping during debugging, and document headers.
  • Although well-suited for hierarchical data representation, it also has a compact syntax for relational data as well.
  • A major part of its accessibility comes from eschewing the use of enclosures like quotation marks, brackets, braces, and open/close-tags, which can be hard for the human eye to balance in nested hierarchies.

See also

There is also an unrelated CSS framework called YAML

30 questions
16
votes
1 answer

"volumes 'type' is a required property" when running docker-compose

I am working through understanding how docker-compose.yaml works. I am trying to define a volume inside the compose file and to mount it at a mount point locally. I try to run a basic .yaml to mount my volume: version: '3.2' services: mydb: …
user7298979
  • 263
  • 1
  • 2
  • 4
4
votes
1 answer

“volumes 'type' is a required property” error with docker-compose

I have just started to learn how docker works and I have a problem with the yaml file when using docker-compose. version: '3.7' services: portainer: container_name: portainer image: portainer/portainer volumes: -…
3
votes
1 answer

Password of new user with LXD and Cloud-init

I'm trying to create a profile to automate the creation of a container, but I'm having trouble with cloud-init. For some reason the password is not being set for the user and is also not being added as a sudoer. Here is the YAML: config: …
3
votes
1 answer

Unable to form a link of a file which is in sites-available to a directory sites-enabled in remote server using ansible?

Unable to form a link of a file which is in sites-available to a directory sites-enabled in remote server using ansible? This is command I want to execute using file module of ansible: ln -s /etc/apache2/sites-available/wsgi-keystone.conf…
2
votes
1 answer

Saltstack best practices documentation clarification

To be clear, I am not asking for the "best way" to use saltstack. I understand that there are tons of ways to use saltstack, and what works for you, works. My question is specifically about the best practices documentation page found here. First…
2
votes
1 answer

How can I get pandoc to recognize my custom YAML fields?

I have a markdown file that starts like this: --- title: Some Title author: - family: Barson given: Foobius --- And I'd like to get pandoc to extract this information and output it. So I have a simple template that looks like this: title:…
Jonathan
  • 2,139
2
votes
1 answer

Adding a comment character to the leftmost column of YAML in Vim

When editing the following yaml with Vim: countries: - country: name: France I can comment out line 2 with :2s/^/#Enter (Case 1). The result is as expected: countries: # - country: name: France However, when I tried to do the same…
2
votes
1 answer

Ansible inventory hierarchy

I want make an inventory file for Ansible as sorting-independent. There is an example below for this…
1
vote
1 answer

Linux program used to gather installed packages, processes, listening ports, etc.?

It's hard to Google this because it seems like everyone and their kid sister has written a script to gather system stats! I once saw a mature program written that is used to gather system stats like installed packages, listening ports, users,…
Synthead
  • 251
1
vote
1 answer

How to find matching yaml files based on content

I have a bunch of files that contain yaml. Some files are yaml-only, some have yaml front-matter. I would like to be able to query the list of files to return a list that match certain criteria. In other words I would like a solution that works…
1
vote
1 answer

pandoc/Markdown: how to remove trailing commas from list template?

Suppose I have YAML list (or other supported format) that I want to print as a comma-separated list in a markdown format. data.yml: --- items: - item1 - item2 - item3 --- template.markdown: **Items**: $for(items)$$items$, $endfor$ How…
Brian McFarland
  • 233
  • 1
  • 3
  • 11
1
vote
0 answers

VSCode Ansible Language extension Python not loading

I'm trying to install the "Ansible Language" Extension for VS-Code: https://marketplace.visualstudio.com/items?itemName=zbr.vscode-ansible It installs the following Extensions as Dependencies automatically: Jupyter, Pylance, Python, and…
1
vote
0 answers

Ansible YAML indentation

How to highlight ansible indentation using vim or any other text editor? I have tried https://github.com/k1LoW/emacs-ansible, but cant able to get highlighted
1
vote
0 answers

I cannot create a Node.JS Web App to be deployed on Azure

For the past week I've been trying to get Azure to deploy an accessible website with Node.JS. Let me re-count the steps I've done. 1) I go to Visual Studio, and I select the Basic Azure Node.js Express 4 Application. 2) I am given a basic project,…
1
vote
1 answer

Why is my yaml build failing test? yaml-cpp-0.6.0: handler_test.cpp:(.text+0x9f2): undefined reference to `testing::internal::GetWithoutMatchers()'

When I install the astronomy software purify. It needs a latest version of yaml like yaml-cpp-0.6.0 I didn't encounter any errors, standard output is like -- The C compiler identification is GNU 7.3.0 -- The CXX compiler identification is GNU…
1
2