Foreman 1.4 - invalid yaml

This goes hand in hand with previous issues with 1.3 where we'd have yaml
parameters being passed, and when trying to update those parameters, the
page would just refresh and not accept changes. Now in 1.4, it at least
gives the reason, and the error is: "invalid yaml".

I've run this through a yaml validator and it checks out fine. Why would
foreman tell me this is invalid?

010 accept tcp 443 requests:
action: accept
port: '443'
proto: tcp
010 accept tcp 80 requests:
action: accept
port: '80'
proto: tcp
020 accept tcp snmp requests:
action: accept
port: '161'
proto: tcp
021 accept tcp snmp requests:
action: accept
port: '161'
proto: udp

Thanks.

Hey Jack, could you provide a few examples of yaml that don't parse, and
where are you parsing this?

Thanks for the report!

··· On Fri, Jan 31, 2014 at 10:14 PM, Jack Watroba < jwatroba@improvementdirect.com> wrote:

This goes hand in hand with previous issues with 1.3 where we’d have yaml
parameters being passed, and when trying to update those parameters, the
page would just refresh and not accept changes. Now in 1.4, it at least
gives the reason, and the error is: “invalid yaml”.

I’ve run this through a yaml validator and it checks out fine. Why would
foreman tell me this is invalid?

010 accept tcp 443 requests:
action: accept
port: '443’
proto: tcp
010 accept tcp 80 requests:
action: accept
port: '80’
proto: tcp
020 accept tcp snmp requests:
action: accept
port: '161’
proto: tcp
021 accept tcp snmp requests:
action: accept
port: '161’
proto: udp

Thanks.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/groups/opt_out.


Daniel Lobato

@elobatoss
blog.daniellobato.me
daniellobato.me

GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30

The yaml parsing in the class parameters page is a little flakey. I wonder
if the spaces in your key names are confusing it - maybe try quoting them?

We ended up just switching to the hash option, left the yaml how it was and
now it's working fine.

··· On Saturday, February 1, 2014 11:12:38 PM UTC-8, Greg Sutcliffe wrote: > > The yaml parsing in the class parameters page is a little flakey. I wonder > if the spaces in your key names are confusing it - maybe try quoting them? >