Deploy Tomcat config and application contexts with Ansible!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Copy Tomcat config(s) | |
template: src={{ item.src }} dest={{ item.dest }} mode={{ item.mode }} owner=root group=root | |
with_items: | |
- { src: 'tomcat/server.xml.j2', dest: '/etc/tomcat7/server.xml', mode: '0644' } | |
- { src: 'tomcat/tomcat-users.xml.j2', dest: '/etc/tomcat7/tomcat-users.xml', mode: '0640' } | |
notify: | |
- restart tomcat7 | |
tags: tomcat | |
- name: Prepare Tomcat web application contexts | |
template: src=tomcat/context.xml.j2 dest={{ item.context_path }} | |
with_items: dspace_webapps | |
when: dspace_webapps is defined | |
tags: tomcat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I prefer the array like syntax instead of one liners of strings. For actions with a many arguments its much clearer.