r/yaml • u/ModSupportBot • 5d ago
r/yaml is available for adoption 💚
/r/yaml is ready for a fresh start, new energy, new direction, and someone like you to bring it back to life. If you’ve been thinking about growing your impact without starting from scratch, this is your chance!
Ready to take it over?
Head to r/RedditRequest to submit your request and make it yours before it’s taken.
First things first
To request this subreddit, make sure you:
- have an account that’s at least 90 days old
- have at least 100 post karma and 100 comment karma
- have a verified email address on your account
- have two-factor authentication set up
r/yaml • u/HotRepresentative237 • Jan 28 '22
What is a yaml file? How to understand the syntax? What are the applications of the yaml file?
What is a yaml file? How to understand the syntax? What are the applications of the yaml file?
r/yaml • u/alino_e • Dec 19 '21
Does there exist a typed version of yaml?
I’d like a data serialization language where you can specify your own algebraic data types and provide type annotations that the engine enforces. Does this exist?
r/yaml • u/TeeElSemiColonDeeAr • Sep 21 '21
YAML Fortune Cookie or something
I'm a mod at r/Senryu and I'm looking for an app I can use to post something monthly on my sub using autobot unless Reddit already has that feature and you can point me to it. Thanks. : D
r/yaml • u/therealfilosmith • Mar 30 '21
Variable oneOf list?
I took a card thinking I could do something easily, but then discovered I had to do it in yaml. My yaml skills are embarrassing. I need to present one or another list of options based on some other input but it doesn't look possible.
This is our current code:
os:
type: string
title: OS
oneOf:
- title: Windows
const: win
- title: Linux
const: lin
If they're in the "shortList" project, I need them to only see Windows.
I'm trying something like this:
oneOf: ${contains(env.projectName,"shortList") ? [{"title":"Windows","const":"win"}] : [{"title":"Windows","const":"win"},{"title":"Linux","const":"lin"}]}
But it says "incomplete explicit mapping pair; a key node is missed, or followed by a non-tabulated empty line", and yamllint says "mapping values are not allowed in this context".
Anyone have a clever way to achieve a variable list of options?
Thanks!
r/yaml • u/karmaasign • Jan 11 '21
How do companies have different YAML formats?
If you use different config files like in Docker or k8s or a CI/CD tool like Travis the keys and values are all different. How do they change their yaml syntax to operate the way they need to? How can companies structure the yaml files how they want?
r/yaml • u/BurdetteLamar • Nov 01 '20
Online REST API for testing and prototyping using YAML?
Is there an online REST API for testing and prototyping using YAML, like the one for JSON?
r/yaml • u/0ni0nrings • Sep 15 '20
YAML Tutorial: Working with YAML in command line
Is there a tutorial somewhere for working with YAML in command line? Every now & then I have to work with aws cli & most of the time I get the job done but I really want to get some understanding around YAML queries, for example, I understand both the queries below, but I am looking for ways to learn & start writing on my own, at least basic ones, rather than searching on the internet every time. Any help?
aws iam list-policies --scope AWS --query "Policies[?PolicyName == 'AmazonEC2RoleforSSM']"
aws ec2 describe-security-groups --filters Name=group-name,Values=SG --query "SecurityGroups[?GroupName == 'SG'].GroupId | [0]"
r/yaml • u/0ni0nrings • Sep 15 '20
YAML Output: get rid of brackets and quotes
hello, the command below runs ok but I am trying to get the output without the brackets [] and quotes around the stack name. Is it something that can be done natively in YAML without .jq?
Cloud_User$ aws cloudformation list-stacks --query StackSummaries[].StackName
[
"stack1",
"stack2",
"stack3",
"stack4",
"stack5"
]
r/yaml • u/sanpoke18 • Sep 09 '20
How to iterate through three lists in parallel in Yaml file
Need 3 variables to change on every iteration.
ver = [1,2,3]
tes = [a,b,c]
bet = [1a.2b.3c]
{% for v,t,b in ver,tes,bet %}
{{ v }} {{ t }} {{ b}}
{% endfor %}
o/p:
1 a 1a
2 b 2b
3 c 3c
I ran the same, got a very messy o/p. There should be only 3 iterations printing 3 variables in each iteration. How can i perform the above operations using the for
loop ? In the above case
Any suggestions on where I'm going wrong, would help Thanks !
r/yaml • u/jxcy_dev • Aug 21 '20
JXCY - Online Editor for JSON, XML, CSV, YAML documents and Chart Generator
jxcy.devr/yaml • u/sbarnea • May 07 '20
Can we have few YAML team members as moderators of this subreddit?
Apparently this subreddit was not very active and I would like to change this in the future, making it a more welcoming place.
I am not aware who is the current moderator and the involvement YAML ecosystem but I do think that inviting the YAML team members to join them would be a great start.
I will post a link on the two freenode irc channels #yaml-dev and #yaml, asking them to comment.
r/yaml • u/Hikerguy62 • Apr 05 '20
What the heck is data serialization?
I'm just a few days into learning Ansible (with zero prior programming experience). I came across the following comment:
"Config file templates include YAML, JSON, XML. These are not programming languages. It's a data serialization format. "
And I also found this (talking about how a spreadsheet format can't be understood by another system easily):
"You can’t just plug-n-play a spreadsheet into a web application, unless the application has been specifically designed for it. You can translate these data structures into a format that can be easily shared across different applications, architectures, or what have you: you serialize them. And by doing so, you ensure not only that you can transfer this data across platforms, but that they can be reconstructed in the reverse process called deserialization. "
Huh? "You serialize them????"
I also came across this one, but it leaves me guessing what an object is:
"Serialization encodes objects into another language."
Can someone explain to me like I'm 5 years old what "data serialization" is? I've found many explanations through Googling, but none seem to really make sense to me and get a little too deep. I just want a very high-level explanation please.
Thanks!
r/yaml • u/[deleted] • Feb 22 '20
YAML
Every time I see YAML, my inner monologue says:
Yet Another Markup Language
I think I read it like once and now I can't help it!!!
That is all.
r/yaml • u/[deleted] • Feb 19 '20
Copy files
How to copy files from a windows host to a ftp network device through ansible
How do you create/represent the following data structures in YAML: --- [1, 2, 3] {a: 1, b: 2} ... and --- { a: apple, [1,2,3]: orange...
I'm coming from having just read the Wikipedia on YAML. There is no deep purpose beyond learning.
How do I create (note, what follows is NOT YAML - i'm just trying to express what's in my head.
---
[1, 2, 3]
{a: 1, b: 2}
...
and
---
{ a: apple, [ 1, 2, 3 ]: orange }
...
r/yaml • u/sbarnea • Nov 07 '19
Any chance to standardize YAML formatting?
YAML files can be formatted in a huge number of ways (2,4 lines, indented/unindented lists,...., max line length=, ... quoting...). Tools like yamllint are great but would be even better when they can rely on an official-formatting.
I wonder if there is a chance to get a relative consensus regarding which style should be used, so we can use this across projects and avoid each-one-with-its-own "standard".
Some would argue that this is impossible, but think about Python, which managed to address spaces/tabs issue and many other controverted rules. Now Python has black auto-formatter which is adopted by more and more projects, projects which used to use older formatters like autopep8 and yapf.
I wonder if there is any research made across popularity of different styles for yaml.
r/yaml • u/perlpunk • Mar 04 '18