Greg,

You could split the lines into a list, then you can still pass them to
insert_lines but they will not be indented. Just separate them by
commas in your code, should work fine.

--Diego

On Aug 31, 2012, at 7:56 AM, Gregory Matthews
<greg.matth...@diamond.ac.uk> wrote:

> how do ppl reconcile indentation for readability in .cf files with the
> needs to insert lines that are not indented? for example:
>
>     g_dnsserver.my_serv_name::
>       "/etc/sysconfig/network-scripts/ifcfg-eth0-range0"
>         create => "true",
>         edit_defaults => empty,
>         edit_line => insert_lines("# extra IP address for legacy clients
>         NETMASK=255.255.255.0
>         BROADCAST=172.23.7.255
>         IPADDR_START=172.23.4.1
>         IPADDR_END=172.23.4.1
>         CLONENUM_START=0"),
>         classes => if_repaired("needsnetworkrestart");
>
> results in all but the first line of the created file being
> unnecessarily indented.
>
> G
> --
> Greg Matthews        01235 778658
> Scientific Computing Group Leader
> Diamond Light Source Ltd. OXON UK
>
> --
> This e-mail and any attachments may contain confidential, copyright and or 
> privileged material, and are for the use of the intended addressee only. If 
> you are not the intended addressee or an authorised recipient of the 
> addressee please notify us of receipt by returning the e-mail and do not use, 
> copy, retain, distribute or disclose the information in or attached to the 
> e-mail.
> Any opinions expressed within this e-mail are those of the individual and not 
> necessarily of Diamond Light Source Ltd.
> Diamond Light Source Ltd. cannot guarantee that this e-mail or any 
> attachments are free from viruses and we cannot accept liability for any 
> damage which you may sustain as a result of software viruses which may be 
> transmitted in or with the message.
> Diamond Light Source Limited (company no. 4375679). Registered in England and 
> Wales with its registered office at Diamond House, Harwell Science and 
> Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
>
>
>
>
> _______________________________________________
> 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