-
Notifications
You must be signed in to change notification settings - Fork 148
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
Task "Remove labels from swarm node" fails when labels are configured outside this role #96
Comments
juanluisbaptiste
added a commit
to juanluisbaptiste/ansible-dockerswarm
that referenced
this issue
May 20, 2021
when removing labels as they could have been added outside this role, thus making swarm_labels undefined. Fixes upstream issue atosatto#96.
juanluisbaptiste
added a commit
to juanluisbaptiste/ansible-dockerswarm
that referenced
this issue
May 20, 2021
when removing labels as they could have been added outside this role, thus making swarm_labels undefined. Fixes upstream issue atosatto#96.
juanluisbaptiste
added a commit
to juanluisbaptiste/ansible-dockerswarm
that referenced
this issue
May 20, 2021
when removing labels as they could have been added outside this role, thus making swarm_labels undefined. Fixes upstream issue atosatto#96.
This was referenced May 20, 2021
Closed
Sorry for the multiple commits, I had to do some reabsing to have this change in its own branch so it could be commited to a PR containing this single fix. |
juanluisbaptiste
added a commit
to juanluisbaptiste/ansible-dockerswarm
that referenced
this issue
May 20, 2021
when removing labels as they could have been added outside this role, thus making swarm_labels undefined. Fixes upstream issue atosatto#96.
juanluisbaptiste
added a commit
to juanluisbaptiste/ansible-dockerswarm
that referenced
this issue
May 20, 2021
when removing labels as they could have been added outside this role, thus making swarm_labels undefined. Fixes upstream issue atosatto#96.
This was referenced May 20, 2021
f4bio
added a commit
to f4bio/ansible-dockerswarm
that referenced
this issue
Feb 14, 2022
when removing labels as they could have been added outside this role, thus making swarm_labels undefined. Fixes upstream issue atosatto#96. Co-authored-by: Juan Luis Baptiste <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
When docker labels are added to nodes of an already provisioned cluster with this role without using the
swarm_labels
variable in the inventory file, but by for example, adding them manually, the role will fail with the following error:The issue arises because the
item
variable will be not empty containing the manually added labels, butswarm_labels
variable will be empty, as any label has not been configured using that variable, so thewhen:
condition of that task will fail.This is fixed by also checking that
swarm_labels
is also defined on that task.The text was updated successfully, but these errors were encountered: