Thanks Jon I will take a look at the link and see if it can help me.
Cheers On Thursday, February 11, 2016 at 10:34:55 AM UTC, Mark Matthews wrote: > > Hi > > I am trying to add multiple lines to the host file on some Windows servers. > > If I use the following playbook I can add one line: > > --- > - name: Add host file entries > hosts: all > tasks: > - name: Check if line is present in config > win_lineinfile: > dest: C:\Windows\System32\drivers\etc\hosts > line: "x.x.x.x www.website1.com" > > > I have tried the following, but keep getting errors: > > --- > - name: Add host file entries > hosts: all > tasks: > - name: Add host file entries > blockinfile: > dest: C:\Windows\System32\drivers\etc\hosts > block: > 10.10.3.76 www.website1.com > 10.10.3.77 www.website1.com > 10.10.3.19 www.website1.com > 10.10.10.2 www.website1.com > 10.10.3.74 www.website1.com > > > Does anyone know of way that this can be done? > -- 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/261353ae-1714-41c4-92a2-cc81e3cb7721%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
