-
Notifications
You must be signed in to change notification settings - Fork 43
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
use list of parameters for ansible conditions #36
Conversation
…internally identical to using logical 'and' operator
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.
Thank you, LGTM!
when: timesync_mode == 2 and timesync_mode2_hwts | ||
when: | ||
- timesync_mode == 2 | ||
- timesync_mode2_hwts |
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.
Is this really guaranteed to be identical? I am asking because Ansible handles bare variables specially. See ansible/ansible#39414 ansible/ansible#51030 ansible/ansible#60943
when: timesync_mode == 2 and timesync_mode2_hwts | ||
when: | ||
- timesync_mode == 2 | ||
- timesync_mode2_hwts |
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.
see above
…le condition. This is just comsetic followup to linux-system-roles#36 with intention to make the role consistent.
Reduce number of long lines by using list of conditions.
As per ansible docs:
To be consistent, lists are used everywhere where there is more than one condition