ansible-community / ansible-nomad

:watch: Ansible role for Nomad
https://galaxy.ansible.com/brianshumate/nomad
BSD 2-Clause "Simplified" License
294 stars 163 forks source link

Allow running the role even if not all hosts are available #119

Closed ygalblum closed 3 years ago

ygalblum commented 3 years ago

Info

I would like to be able to run my playbook without having to filter out machines that are currently down. Keep in mind that in many cases running the playbook while a server is down does not leave any issues that will be revealed later.

Possible User Scenario

  1. Start with a cluster of 3 servers and 2 clients only machine.
  2. We want to add a new machine as a client
  3. If any machine is down, the role fails on an assert
  4. Since some parameters are calculated from the list of hosts itself, the complete list must be provided.
  5. Even if it wasn't required, removing it from the list adds more work that is in most cases not needed

Proposed Solution

In order to maintain backward compatibilty, introduce a variable that will allow overriding this assert

If you agree, I can open a PR for it