Skip to content

Commit

Permalink
Add TimeoutStartSec parameter (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
alessfg authored Apr 5, 2022
1 parent 8ff75ac commit 02c0ab6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ BREAKING CHANGES:
* Rename multiple `nginx_app_protect_*` parameters and tags to `nginx_app_protect_waf_*` to aid in disambiguation.
* Cleanup deprecated Alpine Linux tasks.
* Remove `nginx_app_protect_configure` parameter since it has limited functionality given the `nginx_app_protect_*_policy_file_enable` parameters.
* The `nginx_app_protect_timeout` setting previous only applied to service stop operations. This parameter has been changed to `nginx_app_protect_timeoutstopsec` to better reflect its usage, and a new parameter, `nginx_app_protect_timeoutstartsec` has been introduced to tweak service start operation timeouts.

FEATURES:

Expand All @@ -26,7 +27,6 @@ BUG FIXES:
* Role was failing to uninstall NGINX App Protect DoS packages when the `nginx_app_protect_dos_state` was set to `absent`.
* Uninstallation scenario was unintentionally creating repository entries.
* Ansible check mode runs will no longer fail if NGINX has not yet been installed.
* The `nginx_app_protect_timeout` setting previous only applied to service stop operations. Now includes both start and stop operations.

## 0.7.1 (February 16, 2022)

Expand Down
3 changes: 2 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ nginx_app_protect_start: true
# Increase NGINX service timeout to accommodate ruleset loading from default 90s.
# Default is commented out.
nginx_app_protect_service_modify: true
nginx_app_protect_timeout: 180
nginx_app_protect_timeoutstartsec: 180
nginx_app_protect_timeoutstopcsec: 180

# Copy local NGINX App Protect security policy to host
nginx_app_protect_security_policy_file_enable: false
Expand Down
2 changes: 1 addition & 1 deletion molecule/advanced/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
nginx_app_protect_remove_license: false
nginx_app_protect_waf_install_signatures: true
nginx_app_protect_waf_install_threat_campaigns: true
nginx_app_protect_timeout: 180
nginx_app_protect_timeoutstartsec: 180
8 changes: 6 additions & 2 deletions templates/services/nginx.service.override.conf.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[Service]
# Override default 90 second timeout
TimeoutSec={{ nginx_app_protect_timeout }}
{% if nginx_app_protect_timeoutstartsec is defined %}
TimeoutStartSec={{ nginx_app_protect_timeoutstartsec }}
{% endif %}
{% if nginx_app_protect_timeoutstopsec is defined %}
TimeoutStopSec={{ nginx_app_protect_timeoutstopsec }}
{% endif %}

0 comments on commit 02c0ab6

Please sign in to comment.