Also note that if you really do want to indent the string, there is a 
whitespace_policy that might help...

-Dan

On Jun 18, 2011, at 4:59 AM, Jonathan Clarke wrote:

> Mark, I think sauer is referring to this typo in the Solutions Guide, at
> http://cfengine.com/manuals/cf3-solutions.html#Set-up-a-PXE-boot-server.
> More of a documentation bug than a software bug.
> 
> sauer, you can use multi-line strings wherever you use "plain" strings:
> just adding a line break in a string causes it to continue, until a
> closing " is encountered. For example:
> 
> vars:
> "my_long_string" string => "This
> is
> a
> multi
> line
> string";
> 
> Beware that if you try to indent the lines to match the rest of the
> file, the indents (tabs or spaces) will be included in the string.
> 
> Jonathan
> 
> 
> On 18/06/11 10:56, Mark Burgess wrote:
>> 
>> This is not a bug, I think. The problem is you wrote
>> 
>> "atftpd_conf" string =>  { "5.2" };
>> 
>> You need either
>> 
>> "atftpd_conf" string => "5.2" ;
>> 
>> or
>> 
>> "atftpd_conf" slist =>  { "5.2" };
>> 
>> 
>> On 18/06/11 07:08, Aleksey Tsalolikhin wrote:
>>> It's a bug.  The policy does not pass cf-promises syntax check:
>>> 
>>>    Fatal cfengine error: Validation: rhs is a list, but lhs (string)
>>> is not a list type
>>> 
>>> You can file a bug report on bug.cfengine.com.
>>> 
>>> Best,
>>> -at
>>> 
>>> 
>>> 
>>> On Fri, Jun 17, 2011 at 10:13 AM,<no-re...@cfengine.com>  wrote:
>>>> Forum: Cfengine Help
>>>> Subject: long string format
>>>> Author: sauer
>>>> Link to topic: https://cfengine.com/forum/read.php?3,22500,22500#msg-22500
>>>> 
>>>> Can someone explain the multi-line string format used, for example, in the 
>>>> solution guide?  I'm not following why there's a single-element list, a 
>>>> semicolon, and then a really long string afterwards.  Here's one example:
>>>> 
>>>> 
>>>>  "atftpd_conf" string =>  { "5.2" };
>>>>      "
>>>> ###########################################
>>>> 
>>>> ### This file is protected by CFEngine. ###
>>>> 
>>>> ### Whatever you do, it will be changed ###
>>>> 
>>>> ###     back to a promising state.      ###
>>>> 
>>>> ###########################################
>>>> 
>>>> 
>>>> 
>>>> ATFTPD_OPTIONS=\"--daemon \"
>>>> ATFTPD_USE_INETD=\"no\"
>>>> ATFTPD_DIRECTORY=\"/tftpboot\"
>>>> ATFTPD_BIND_ADDRESSES=\"\"
>>>>      ";
>>>> 
>>>> 
>>>> I'd be inclned to just do something like this, I'd think:
>>>> 
>>>> 
>>>>  "atftpd_conf" string =>  "
>>>> ###########################################
>>>> ...
>>>> ";
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Help-cfengine mailing list
>>>> Help-cfengine@cfengine.org
>>>> https://cfengine.org/mailman/listinfo/help-cfengine
>>>> 
>>> _______________________________________________
>>> Help-cfengine mailing list
>>> Help-cfengine@cfengine.org
>>> https://cfengine.org/mailman/listinfo/help-cfengine
>> _______________________________________________
>> Help-cfengine mailing list
>> Help-cfengine@cfengine.org
>> https://cfengine.org/mailman/listinfo/help-cfengine
> 
> 
> -- 
> --------------------------------------------------------------
> Jonathan Clarke - jonat...@phillipoux.net
> --------------------------------------------------------------
> Ldap Synchronization Connector (LSC) - http://lsc-project.org
> --------------------------------------------------------------
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@cfengine.org
> https://cfengine.org/mailman/listinfo/help-cfengine



_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to