Skip to content
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

Closed
wants to merge 2 commits into from
Closed

Conversation

jadjay
Copy link

@jadjay jadjay commented Feb 6, 2017

It is required to prefer check_mode: no

It remove a warning during deployement

@jadjay
Copy link
Author

jadjay commented Feb 6, 2017

Please could you merge this ?

Copy link
Owner

@jdauphant jdauphant left a 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
Copy link
Owner

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
Copy link
Owner

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 %}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as previous comment

@jdauphant
Copy link
Owner

@jadjay Have you see the review? Do you need help?

@jdauphant
Copy link
Owner

Hello @jadjay,
Where are you with the pull request ?

If you don't have time, @pieterlexis may be able to help on this feature.
One of the solution is simple to implement:
We can check if nginx_stream_params isn't an empty list and not nginx_stream_configs not an empty map.

@jdauphant
Copy link
Owner

I close this PR, #169 with the stream fix have been merged !
For "Always run" #140 will be merge when Ansible 2.3 will be available.

Thanks for your help

@jdauphant jdauphant closed this Mar 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants