-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
Lint: Fix [602] Don't compare to empty string
#1141
Conversation
@@ -7,9 +7,9 @@ | |||
no_log: true | |||
changed_when: false | |||
when: | |||
- composer_authentication.hostname is defined and composer_authentication.hostname != "" |
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.
Do we even need to check these? Seems pretty defensive. By default they just aren't defined right? So this is only guarding against people defining them with no value?
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.
We need it (at least the password
one) because of password
defaults to empty string. See:
trellis/group_vars/all/helpers.yml
Lines 23 to 26 in faaf213
site_packagist_org_authentications: | |
- { hostname: repo.packagist.com, username: token, password: "{{ vault_wordpress_sites[site].packagist_token | default('') }}" } | |
site_composer_authentications: "{{ vault_wordpress_sites[site].composer_authentications | default([]) }}" | |
composer_authentications: "{{ site_packagist_org_authentications + site_composer_authentications }}" |
I suggest we remove all 3 when
conditions when we depercate packagist_token
roots#1141 bases on ansible/ansible-lint#457 (comment) which depends on ansible/ansible#51030 which merged into anisble v2.8.0.
#1141 bases on ansible/ansible-lint#457 (comment) which depends on ansible/ansible#51030 which merged into anisble v2.8.0.
#1141 bases on ansible/ansible-lint#457 (comment) which depends on ansible/ansible#51030 which merged into anisble v2.8.0.
See: ansible/ansible-lint#457 (comment)