Results 1 to 1 of 1

Thread: Ubuntu Server YAML Validation via shell

  1. #1
    Join Date
    Sep 2011
    Location
    Behind you!
    Beans
    1,689
    Distro
    Ubuntu 20.04 Focal Fossa

    Question Ubuntu Server YAML Validation via shell

    With the need to use YAML in Ubuntu Server 18 (netplan), is there a built-in way to validate a .yaml file BEFORE it blows up inside whatever app is trying to use it?

    I've found various online validators and other ways using Python, Ruby and travis but I'm looking for a way to validate without the need to install additional software.

    I thought about making a wrapper to feed a file to an online service but if the service goes away or do not have Internet access, it would be wasted effort. (EDIT: This might be the only way if nothing built-in works)

    Anyone have a solution?

    Thanks,
    LHammonds

    EDIT: Stuff I've found so far related to this

    Bash script to read YAML using sed/awk (by pkuczynski)
    Bash script expanding pkuczynski script (by jasperes)
    Verify YAML via Shell (requires Python)
    yamllint.com - Online web-based validator
    CodeBeautify.org - Online web-based validator
    Last edited by LHammonds; April 18th, 2018 at 05:43 PM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •