Skip to content

Instantly share code, notes, and snippets.

@silverskyvicto
Last active June 23, 2019 08:48
Show Gist options
  • Save silverskyvicto/bf1cccb57d2ac7648df9f2ec1242748a to your computer and use it in GitHub Desktop.
Save silverskyvicto/bf1cccb57d2ac7648df9f2ec1242748a to your computer and use it in GitHub Desktop.
- name: Install tomcat
hosts: {{ server }}
become: yes
tasks:
- name: Download file with check (sha512)
get_url:
url: http://ftp.jaist.ac.jp/pub/apache/tomcat/tomcat-9/v9.0.21/bin/apache-tomcat-9.0.21.tar.gz
dest: /root/apache-tomcat-9.0.21.tar.gz
checksum: sha512:a8788ba8187f940b55d3db6cb0108943b8b48aecc2d9a3307409d3cbf72fac9b19fa434baa97aa0d4ac552f7c13967932b8a36dbae5d582bc14ed13bb058ea9b
- name: Extract tar file
unarchive:
src: /root/apache-tomcat-9.0.21.tar.gz
dest: /opt
remote_src: yes
- name: Rename directory
command: mv /opt/apache-tomcat-9.0.21 /opt/tomcat
- name: Delete Tomcat tar.gz
file:
path: /root/apache-tomcat-9.0.21.tar.gz
state: absent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment