• 1 Post
  • 9 Comments
Joined 11 months ago
cake
Cake day: December 6th, 2023

help-circle






  • Let me try to reword it to make it clear.

    I have 3 machines in my group. 1 of those will be the “leader”. The others will be “joiners”. The leader could already be initialized, so I need to check all machines to see if there is a leader already. If no Leader exists then any of the machines will do (the first) All of the machines that will join will need some data from the leader, so there will be a role task that will be delegated to the leader (ansible needs to know which host is the leader so as to be able to delegate to it)

    This may sound complex but it is a very common pattern for distributed application setup.

    idempotency doesn’t play a role in this behaviour - the machines are all unique, but who knows what may have changed between ansible runs.