Skip to content

Instantly share code, notes, and snippets.

@johncarroll
Created July 6, 2012 12:04
Show Gist options
  • Save johncarroll/3059767 to your computer and use it in GitHub Desktop.
Save johncarroll/3059767 to your computer and use it in GitHub Desktop.
Tomcat SLS
{% set tomcat_version = "7.0.28" %}
{% set tomcat_hash = "md5=cfcd5b624df6aa94e9c91cd1fb4d0c71" %}
{% set tomcat_tarball = "/usr/local/src/apache-tomcat-" + tomcat_version + ".tar.gz" %}
{% set tomcat_prefix = "/usr/local" %}
{% set tomcat_url = "http://mirror.ox.ac.uk/sites/rsync.apache.org/tomcat/tomcat-7/v" + tomcat_version + "/bin/apache-tomcat-" + tomcat_version + ".tar.gz" %}
tomcat_tarball:
file.managed:
- name: {{tomcat_tarball}}
- source: {{tomcat_url}}
- source_hash: {{tomcat_hash}}
- makedirs: true
- replace: false
tomcat_untar:
cmd.wait:
- name: "tar xfvz {{tomcat_tarball}} -C {{tomcat_prefix}}"
{{tomcat_prefix}}/apache-tomcat"
- watch:
- file:
{{tomcat_tarball}}
tomcat_symlink:
file.symlink:
- name: {{tomcat_prefix}}/apache-tomcat
- target: {{tomcat_prefix}}/apache-tomcat-{{tomcat_version}}
- require:
- cmd:
tomcat_untar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment