I have yaml file from an ansible role, when I run yamllinst, it output as follows:
22:81 error line too long (81 > 80 characters) (line-length) 29:81 error line too long (109 > 80 characters) (line-length)
This is part of the file (I've commented the lines that has errors, that comments are no real part of the file)
- name: Check that all the variables needed are defined
assert:
that:
- kimai_version is defined
- kimai_app_env is defined
- kimai_user is defined
- kimai_group is defined
- kimai_home is defined
- kimai_private is defined
- ( kimai_docroot is defined ) and ( kimai_docroot | basename == "public" ) # Line 29
- kimai_dbuser is defined
- kimai_dbpass is defined
- kimai_dbhost is defined
- kimai_dbport is defined
- kimai_dbname is defined
- kimai_notify_from is defined
- ( kimai_email_transport is defined ) and ( kimai_email_transport is regex("^smtp|sendmail|gmail|$") ) # Line 29
- kimai_email_host is defined
- kimai_email_port is defined
- kimai_user_registration is defined
The question How do I break a string in YAML over multiple lines? is a bit different because in that case, the key has only one value.
How can I break the 22 and 29th lines to shorten them?