I am trying to use the replace module, and I see all of these examples with 
\1 and \2 in them.  I assume these are for backrefs or soemthing?  Can 
someone explain it to me?  I am trying to append "sss" to my passwd and 
group lines in my nsswitch file.  I haven't tested my code yet, but I would 
still like to know what \1 \2 mean.  Maybe someone can point me to some 
documentation as I can't seem to find anything on it myself.

- name: Update nsswitch.conf
  replace:
    path:     /etc/nsswitch.conf
    regexp:   {{item.regexp}}
    replace:  {{item.replace}}
  with_items:
    - {regexp: '^passwd.*'
       replace: "\1 sss" },
    - {regexp: '^group.*'
       replace: "\1 sss" }


-- 
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/7f0540ba-0221-47e4-b9ed-0a3a91fc1fe6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to