diff --git a/roles/jws/README.md b/roles/jws/README.md index 6f57f0c5..687b9201 100644 --- a/roles/jws/README.md +++ b/roles/jws/README.md @@ -36,26 +36,26 @@ Role Defaults ### Download and install parameters -| Variable | Description | Default | -|:-------------------------|:-----------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------| -| `jws_install_method` | Installation method, allowed values: `['zipfiles','rpm']` | `zipfiles` | -| `jws_install_dir` | Installation path for JWS/tomcat | `/opt` | -| `jws_rpm` | Installation RPM version | `jws6` | -| `jws_version` | Version of JWS to install | `6.0.0` | -| `jws_apply_patches` | Install JWS most recent cumulative patch for requested version | `False` | -| `jws_selinux_enabled` | Enable selinux policy enforcement for JWS | `True` | -| `jws_home` | Default installation path for JWS archives | `{{ jws_install_dir }}/jws-{{ jws_version.split('.')[0] }}.{{ jws_version.split('.')[1] }}/tomcat` | -| `jws_user` | posix user account for service | `tomcat` | -| `jws_uid` | posix UID user account for service | `tomcat` | -| `jws_group` | posix group for service | `tomcat` | -| `jws_gid` | posix GID user account for service | `tomcat` | -| `jws_native` | Install native bits; provide a zipfile path below with tomcat, while on JWS it will be interpolated from version | `False` | -| `jws_native_zipfile` | Tomcat native binaries archive filename | `''` | -| `jws_force_install` | Whether to stop any running tomcat process and continue installation | `false` | -| `jws_archive_repository` | Path local to controller for offline/download archive files | `{{ lookup('env', 'PWD') | default('/opt') }}` | -| `jws_offline_install` | Whether to perform a completely offline install | -`false` | - +| Variable | Description | Default | +|:---------------------------|:-----------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------| +| `jws_install_method` | Installation method, allowed values: `['zipfiles','rpm']` | `zipfiles` | +| `jws_install_dir` | Installation path for JWS/tomcat | `/opt` | +| `jws_rpm` | Installation RPM version | `jws6` | +| `jws_version` | Version of JWS to install | `6.0.0` | +| `jws_apply_patches` | Install JWS most recent cumulative patch for requested version | `False` | +| `jws_selinux_enabled` | Enable selinux policy enforcement for JWS | `True` | +| `jws_home` | Default installation path for JWS archives | `{{ jws_install_dir }}/jws-{{ jws_version.split('.')[0] }}.{{ jws_version.split('.')[1] }}/tomcat` | +| `jws_user` | posix user account for service | `tomcat` | +| `jws_uid` | posix UID user account for service | `tomcat` | +| `jws_group` | posix group for service | `tomcat` | +| `jws_gid` | posix GID user account for service | `tomcat` | +| `jws_native` | Install native bits; provide a zipfile path below with tomcat, while on JWS it will be interpolated from version | `False` | +| `jws_native_zipfile` | Tomcat native binaries archive filename | `''` | +| `jws_force_install` | Whether to stop any running tomcat process and continue installation | `false` | +| `jws_archive_repository` | Path local to controller for offline/download archive files | `{{ lookup('env', 'PWD') | default('/opt') }}` | +| `jws_offline_install` | Whether to perform a completely offline install |`false` | +| `jws_url_download_retries` | Number of retries in case a download fails | `5` | +| `jws_url_download_delay` | Delay among two consequent download retries | `10` | ### Service configuration diff --git a/roles/jws/defaults/main.yml b/roles/jws/defaults/main.yml index fc60e7b9..87b0e42f 100644 --- a/roles/jws/defaults/main.yml +++ b/roles/jws/defaults/main.yml @@ -34,6 +34,9 @@ jws_apache_archive_download_url_prefix: 'https://archive.apache.org/dist/tomcat/ jws_install_download_archive_require_privilege_escalation: True jws_install_unarchive_require_privilege_escalation: True +jws_url_download_retries: 5 +jws_url_download_delay: 10 + # Default version of Apache Tomcat to use if no version is provided tomcat_version: 10.1.13 # Switch to True if you want to also download native bits diff --git a/roles/jws/meta/argument_specs.yml b/roles/jws/meta/argument_specs.yml index af0d4f48..6d9b85fb 100644 --- a/roles/jws/meta/argument_specs.yml +++ b/roles/jws/meta/argument_specs.yml @@ -412,6 +412,14 @@ argument_specs: default: "{{ jws_install_dir }}/{{ jws_zipfile_rootdir }}" description: "Home directory of jws zipfile installation" type: "str" + jws_url_download_retries: + default: 5 + description: "Number of retries in case a download fails" + type: "int" + jws_url_download_delay: + default: 10 + description: "Delay among two consequent download retries" + type: "int" uninstall: options: jws_skip_delete_zipfile: diff --git a/roles/jws/tasks/install/url.yml b/roles/jws/tasks/install/url.yml index 837bc4cb..770e863c 100644 --- a/roles/jws/tasks/install/url.yml +++ b/roles/jws/tasks/install/url.yml @@ -17,3 +17,5 @@ mode: 0640 owner: "{{ jws.user }}" group: "{{ jws.group }}" + retries: "{{ jws_url_download_retries }}" + delay: "{{ jws_url_download_delay }}"