anchor.diff:  ----
   - set_fact:
       elasticsearch_restart_needed: True
  +  when: ...
   ----
   
   Then on lucky days, you can skip the expensive `stop_start` step and have a quick and fully parallel deployment.
  
positive.code: ...
  ----
  
  This naive Ansible playbook will stop all Elasticsearch nodes at the same time, making the whole cluster unavailable until nodes are started again.
  To fix this problem, the role can be ran in serial instead of parallel:
  
  .deploy.yml
  
negative.code: 
  == Cluster wide configuration
  
  In distributed systems, some configuration must be done only once for the whole cluster.
  Here are some examples:
  
  * *Elasticsearch*: License, Users and grants, Indices, Mappings, Templates, Cluster settings (allocation awareness, minimum master nodes...)
  * *Kafka*: Users and grants, Topics
  * *Cassandra*: Users and grants, Keyspaces, Tables
  
  Obviously, this kind of configuration must be ran in the `after` step, once the cluster is started and listening.
  
  .roles/elasticsearch/tasks/after.yml
  [source,yaml]
  ----
  # Configure article index
  - uri:
      url: "http://{{ ansible_ssh_hostname }}:9200/article"
      method: PUT
  