diff --git a/defaults/main.yml b/defaults/main.yml index 4a05b4c..f454018 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -68,7 +68,7 @@ tomcat_war_to_deploy_from_maven: # If using Ansible 2.6 or newer, this is settable as well # verify_checksum: always -tomcat_download_wars: true +tomcat_download_wars: false tomcat_war_to_deploy_urls: - url: https://tomcat.apache.org/tomcat-8.5-doc/appdev/sample/sample.war name: sample.war diff --git a/molecule/default/group_vars/tomcat/main.yml b/molecule/default/group_vars/tomcat/main.yml index fafc50d..99d936b 100644 --- a/molecule/default/group_vars/tomcat/main.yml +++ b/molecule/default/group_vars/tomcat/main.yml @@ -18,3 +18,21 @@ tomcat_agents_config: } tomcat_logs_path: /var/log/tomcat + +tomcat_download_from_maven_wars: true +tomcat_war_to_deploy_from_maven: + - name: hello-servlet.war + group_id: "io.fabric8.jube.images.examples" + artifact_id: "hello-servlet" + extension: "war" + repository_url: "https://repo.maven.apache.org/maven2/" + # If using Ansible 2.6 or newer, this is settable as well + # verify_checksum: always + +tomcat_download_wars: true +tomcat_war_to_deploy_urls: + - url: https://tomcat.apache.org/tomcat-8.5-doc/appdev/sample/sample.war + name: sample.war +tomcat_local_wars: false +tomcat_war_to_deploy_path: + - "{{ playbook_dir }}/sample.war" \ No newline at end of file diff --git a/molecule/default/tests/test_tomcat.yml b/molecule/default/tests/test_tomcat.yml index fce9c57..9e22e86 100644 --- a/molecule/default/tests/test_tomcat.yml +++ b/molecule/default/tests/test_tomcat.yml @@ -58,6 +58,8 @@ file: exists: true /opt/tomcat/webapps/sample.war: exists: true + /opt/tomcat/webapps/hello-servlet.war: + exists: true command: java -cp /opt/tomcat/lib/catalina.jar org.apache.catalina.util.ServerInfo | grep 'Server version': diff --git a/tasks/deploy.yml b/tasks/deploy.yml index c5b750e..e6fa42e 100644 --- a/tasks/deploy.yml +++ b/tasks/deploy.yml @@ -2,7 +2,7 @@ - name: Tomcat | Install download war from maven require package apt: - package: "['python-lxml']" + package: "python-lxml" state: present notify: restart tomcat when: tomcat_download_from_maven_wars