removes advertise_addr from required parameters when state is "join" (#646)

* removes advertise_addr from required parameters when state is "join"

addressing this issue: https://github.com/ansible-collections/community.general/issues/439

* adjusts test

* adds changelog
pull/676/head
Minh Ha 2020-07-20 12:14:16 -04:00 committed by GitHub
parent 09d68678ee
commit 52cce0b7af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -0,0 +1,2 @@
bugfixes:
- docker_swarm - removes ``advertise_addr`` from list of required arguments when ``state`` is ``"join"`` (https://github.com/ansible-collections/community.general/issues/439).

View File

@ -627,7 +627,7 @@ def main():
)
required_if = [
('state', 'join', ['advertise_addr', 'remote_addrs', 'join_token']),
('state', 'join', ['remote_addrs', 'join_token']),
('state', 'remove', ['node_id'])
]

View File

@ -10,11 +10,11 @@
ignore_errors: yes
register: output
- name: assert failure when called with state=join and no advertise_addr,remote_addrs,join_token
- name: assert failure when called with state=join and no remote_addrs,join_token
assert:
that:
- 'output.failed'
- 'output.msg == "state is join but all of the following are missing: advertise_addr, remote_addrs, join_token"'
- 'output.msg == "state is join but all of the following are missing: remote_addrs, join_token"'
- name: Test parameters with state=remove
docker_swarm: