This seems to be broken in Ansible 2.1.1.0. On Thursday, July 28, 2016 at 2:32:40 PM UTC-4, Alli wrote: > > You can use a block indentation indicator > http://www.yaml.org/spec/1.2/spec.html#id2793979 > > e.g: > > - blockinfile: > dest: /etc/postfix/master.cf > insertafter: "^submission inet n - n - - > smtpd$" > block: |2 > -o syslog_name=postfix/submission > -o ... > > The number specifies how many spaces there are that are meaningful, so > there's a total of 8 leading spaces, 6 of which are yaml indentation and 2 > for the block itself. > > From this excellent answer: http://stackoverflow.com/a/21699210 > > > On Friday, 27 May 2016 08:33:15 UTC+12, Joanna Delaporte wrote: >> >> I am using blockinfile to write lines to a vars file that includes a few >> different layers of indentation. How do I make sure the indentation levels >> are maintained correctly using the block | statement? >> >> Thanks! >> Joanna >> >
-- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/71efd8ce-357f-4a08-8ed8-67eb5c4ecda0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
