-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always_run is deprecated #161 #162
Conversation
Please could you merge this ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jadjay Thanks for the contribution, I have made some comments
@@ -18,7 +18,7 @@ | |||
command: "{{ nginx_binary_name }} -t" | |||
register: result | |||
changed_when: "result.rc != 0" | |||
always_run: yes | |||
check_mode: no |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check_mode
was introduced in ansible 2.2 (the last version), it make the role incompatible in previous version, it was decided in #140 to wait until Ansible 2.3 is available.
@@ -49,4 +49,4 @@ | |||
with_dict: "{{ nginx_stream_configs }}" | |||
notify: | |||
- reload nginx | |||
when: nginx_official_repo_mainline | |||
when: nginx_stream_params is defined and nginx_stream_configs is defined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nginx_stream_params
and nginx_stream_configs
are always defined (they are defined in defaults/main.yml
).
We have to check if there are not an empty list for nginx_stream_params
or not an empty map for nginx_stream_configs
@@ -34,7 +34,7 @@ http { | |||
include {{ nginx_conf_dir }}/sites-enabled/*; | |||
} | |||
|
|||
{% if nginx_official_repo_mainline %} | |||
{% if nginx_stream_params or nginx_stream_params %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as previous comment
@jadjay Have you see the review? Do you need help? |
Hello @jadjay, If you don't have time, @pieterlexis may be able to help on this feature. |
It is required to prefer check_mode: no
It remove a warning during deployement