Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save daBONDi/d3fb2c059f62f1b74c021b1f316a48ef to your computer and use it in GitHub Desktop.
Save daBONDi/d3fb2c059f62f1b74c021b1f316a48ef to your computer and use it in GitHub Desktop.
Ansible - win_lineinfile - Comment line in XML - Disable File Tomcat AJP Port
- name: "Ensure Tomcat AJP Connector on Port 8009 is Disabled"
win_lineinfile:
path: "c:/temp/server.xml"
regex: '^(\s*)(<Connector port="8009" protocol="AJP\/1\.3" redirectPort="8443" \/>)'
backrefs: true
line: '$1<!-- $2 -->'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment