setup.yml 792 B

123456789101112131415161718192021222324
  1. ---
  2. - name: Evaluate node groups
  3. hosts: localhost
  4. connection: local
  5. tasks:
  6. - name: Evaluate oo_exclude_nodes_to_config as all nodes that have already been bootstrapped
  7. add_host:
  8. name: "{{ item }}"
  9. groups: oo_exclude_nodes_to_config
  10. ansible_ssh_user: "{{ g_ssh_user | default(omit) }}"
  11. ansible_become: "{{ g_sudo | default(omit) }}"
  12. with_items: "{{ groups.oo_nodes_to_config | default([]) }}"
  13. when:
  14. - hostvars[item].openshift is defined
  15. - hostvars[item].openshift.common is defined
  16. - hostvars[item].openshift_is_bootstrapped | bool
  17. changed_when: False
  18. - name: Disable excluders
  19. hosts: oo_nodes_to_config:!oo_exclude_nodes_to_config
  20. gather_facts: no
  21. roles:
  22. - role: openshift_excluder
  23. r_openshift_excluder_action: disable