On 18/03/2016 01:44, Jakov Sosic wrote:
> Even this is causing problems:
>
> $ puppet apply -e 'notify { $::networking['interfaces']['bond0.2']['ip']: }'
> Error: Could not parse for environment production: Syntax error at '2' at line 1:42 on node xxx
Normally, in puppet code, there is no problem. I think your command is
incorrect because you use simple quotes to delimit in the shell the value
of the -e option, and you use simple quotes inside the value too.
Furthermore, in my puppet version (ie 4.4.0), the subkeys to reach the
IP address are different from your example above. For me, this works well:
~# puppet apply -e 'notice ( $::networking["interfaces"]["bond0.24"]["bindings"][0]["address"] )'
Notice: Scope(Class[main]): 192.168.24.11
Notice: Compiled catalog for cargo01.dc2.backbone.education in environment production in 0.04 seconds
Notice: Applied catalog in 0.08 seconds
Regards.
François Lafont