Hello Visser,

Appreciate your time for checking this.

Here i am little confused that, 

Here I just want to modify the server.xml file only.
(comment basicuserregistry.xml and uncomment ldapuseruserregistry.xml file).

Both the files are already present there in the defined location already, 
but just want to edit the server.xml file to comment and uncomment..


On Tuesday, November 6, 2018 at 12:24:26 AM UTC+5:30, Dick Visser wrote:
>
> On Mon, 5 Nov 2018 at 16:59, visar <vivu...@gmail.com <javascript:>> 
> wrote: 
> > 
> > Hello kai, 
> > 
> > This is the xml file , where i want to enable Ldap user registry and 
> disable basic local registry using ansible 
>
> Your XML file actually has multiple include locations, so you'd have 
> to loop through them. 
> Since this is the case, you also need to make sure there are no 
> additional include locations. 
> Something like this should do the trick: 
>
>
>
>   vars: 
>     locations: 
>       - conf/ldapUserRegistry.xml 
>       - conf/application.xml 
>
>   tasks: 
>   - name: Ensure locations are configured 
>     xml: 
>       path: server.xml 
>       xpath: "/server/include[{{ i + 1 }}]" 
>       attribute: location 
>       value: "{{ item }}" 
>     loop: "{{ locations }}" 
>     loop_control: 
>       index_var: i 
>
>   - name: Ensure no other locations are configured 
>     xml: 
>       path: server.xml 
>       xpath: "/server/include[position()>{{ (locations | length) }}]" 
>       state: absent 
>
>
>
>
>
> -- 
> Dick Visser 
> Trust & Identity Service Operations Manager 
> GÉANT 
> T: +31205304488 
> PGP key fingerprint: F575 58C6 62C6 FD5B A9CD 217C 2667 13D4 E6EF 488D 
> GÉANT Vereniging (Association) is registered with the Chamber of 
> Commerce in Amsterdam with registration number 40535155 and operates 
> in the UK as a branch of GÉANT Vereniging. Registered office: 
> Hoekenrode 3, 1102 BR Amsterdam, The Netherlands. UK branch address: 
> City House, 126-130 Hills Road, Cambridge CB2 1PQ, UK. 
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f0c0e0fc-3aa6-4bbc-bd7a-793b314497c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to